This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
Derived from gdb/testsuite/gdb.base/store.c : struct s_3 { short s[3]; } z_3, s_3; struct s_3 add_struct_3 (struct s_3 s) { int i; for (i = 0; i < sizeof (s) / sizeof (s.s[0]); i++) { s.s[i] = s.s[i] + s.s[i]; } return s; } struct s_3 wack_struct_3 (void) { int i; register struct s_3 u = z_3; for (i = 0; i < sizeof (s_3) / sizeof (s_3.s[0]); i++) { s_3.s[i] = i + 1; } u = add_struct_3 (u); return u; } Compiling this with arm-none-eabi-gcc gives : try.c: In function 'wack_struct_3': try.c:41: error: address of register variable 'u' requested 3.4.5 and 4.0 seem to compile this ok. Its possibly related to the fix for #18160 .
Occurs with arm-none-eabi-gcc 4.1.0 -branch with yesterday's update.
*** This bug has been marked as a duplicate of 26004 ***