aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/avr/pr52472.c
blob: 84ed92f0c38045835879841d6013f009dfd81771 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target { ! avr_tiny } } } */
/* { 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);
}