User account creation filtered due to spam.

Bug 52587 - using out of bounds of an array with size of one
Summary: using out of bounds of an array with size of one
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 15:34 UTC by David Magagnosc
Modified: 2014-12-11 14:26 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed source file (2.06 KB, text/plain)
2012-03-14 15:34 UTC, David Magagnosc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Magagnosc 2012-03-14 15:34:35 UTC
Created attachment 26891 [details]
Preprocessed source file

Using built-in specs.
COLLECT_GCC=gcc-4.6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-g3' '-O3' '-fno-strict-aliasing' '-o' 'ICE.o' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1 -E -quiet -v -imultilib . -imultiarch x86_64-linux-gnu -dD ICE.c -mtune=generic -march=x86-64 -fno-strict-aliasing -g3 -fworking-directory -O3 -fpch-preprocess -fstack-protector -o ICE.i
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-g3' '-O3' '-fno-strict-aliasing' '-o' 'ICE.o' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1 -fpreprocessed ICE.i -quiet -dumpbase ICE.c -mtune=generic -march=x86-64 -auxbase-strip ICE.o -g3 -O3 -version -fno-strict-aliasing -fstack-protector -o ICE.s
GNU C (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (Ubuntu/Linaro 4.6.1-9ubuntu3) version 4.6.1 (x86_64-linux-gnu)
        compiled by GNU C version 4.6.1, GMP version 5.0.1, MPFR version 3.0.1-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 5dede901e38d49932d3155c3e888bca1
ICE.c: In function ‘func3’:
ICE.c:36:19: internal compiler error: in emit_move_insn, at expr.c:3355
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccbwMOGo.out file, please attach this to your bugreport.


Notes:
1) No ICE with -O1.
2) Changing n_elts to 2 avoids the ICE.
3) Compiles correctly with GCC 4.4.6.
Comment 1 Andrew Pinski 2012-03-15 09:01:35 UTC
This works correctly with "4.8.0 20120313" and "4.7.0 20120212".
Comment 2 Marek Polacek 2014-12-11 14:26:49 UTC
So should be fixed now.