[Bug c/26004] New: gcc errors on valid code
gcc-bugzilla at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Jan 28 13:06:00 GMT 2006
Gcc complains about legal code. Test case stripped down from a gdb
testsuite test case.
Environment:
System: Linux fishfood.ninemoons.com 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:22
EST 2006 i686 i686 i386 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/latest/trunk/src/gcc/configure -v
--prefix=/opt/local/latest/trunk --enable-languages=c,c++
--cache-file=.././config.cache --srcdir=/src/latest/trunk/src/gcc
How-To-Repeat:
$ cat /tmp/bug.c
struct s_1 { short s[1]; } z_1;
struct s_1
add_struct_1 (struct s_1 s)
{
return s;
}
struct s_1
wack_struct_1 (void)
{
register struct s_1 u = z_1;
u = add_struct_1 (u);
return u;
}
$ gcc -c /tmp/bug.c
/tmp/bug.c: In function âÂÂwack_struct_1âÂÂ:
/tmp/bug.c:13: error: address of register variable âÂÂuâ requested
--
Summary: gcc errors on valid code
Product: gcc
Version: 2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fnf at specifix dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26004
More information about the Gcc-bugs
mailing list