summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/avr/pr52472.c
blob: 701cfb42a253155995fc99c3e43555abe40a4eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-Os -g -Wno-pointer-to-int-cast" } */

/* This testcase exposes PR52472. expand_debug_expr mistakenly
   considers the address space of data to be generic, and
   asserts that PSImode pointers aren't valid in the generic 
   address space. */

extern const __memx unsigned data[][10];

unsigned long ice (void)
{
  unsigned long addr32;

  return addr32 = ((unsigned long) data);
}