[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 Richard Guenther changed: What|Removed |Added Status|WAITING |NEW CC|

[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread daniel.f.starke at freenet dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 --- Comment #5 from Daniel Starke 2012-01-19 14:51:33 UTC --- Compiling it with gcc -static -fcommon -o main.o -c main.c gcc -static -fcommon -o a.o -c a.c gcc -static -o main.exe main.o a.o results in $ ./main myVar[0] = 5 myVar[1] = 6 myVar[2]

[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 --- Comment #4 from Richard Guenther 2012-01-19 11:57:18 UTC --- (In reply to comment #3) > [...] > COLLECT_GCC_OPTIONS='-static' '-O2' '-v' '-Q' '-o' 'a.o' '-c' '-mtune=i386' > '-march=i386' > [...] > GNU C (GCC) version 4.6.2 (mingw32) >

[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread daniel.f.starke at freenet dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 --- Comment #3 from Daniel Starke 2012-01-19 11:52:27 UTC --- [...] COLLECT_GCC_OPTIONS='-static' '-O2' '-v' '-Q' '-o' 'a.o' '-c' '-mtune=i386' '-march=i386' [...] GNU C (GCC) version 4.6.2 (mingw32) compiled by GNU C version 4.6.2, GMP v

[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 --- Comment #2 from Mikael Pettersson 2012-01-19 11:34:52 UTC --- I can reproduce with x86_64-w64-mingw32-gcc-4.6.2 on cygwin. Adding 'extern' to the declaration in the .h file fixes it.

[Bug target/51900] [4.6 Regression] const variable initialization always zero

2012-01-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51900 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|