public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46848] New: ICE with initializer list for std::vector
@ 2010-12-08 12:07 magicdice at hotmail dot com
  2010-12-08 12:31 ` [Bug c++/46848] " redi at gcc dot gnu.org
  2010-12-08 12:33 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: magicdice at hotmail dot com @ 2010-12-08 12:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46848

           Summary: ICE with initializer list for std::vector
           Product: gcc
           Version: 4.4.5
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: magicdice@hotmail.com


Created attachment 22683
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22683
preprocessed file

I get an ICE with the following code (compiled as "g++ test.cc"):

#include <vector>

int main() {
  std::vector<int> baseVector[2];
  baseVector = {std::vector<int>(10), std::vector<int>(10)};
  return 0;
}



Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' '-march=i686'
 /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1plus -E -quiet -v -D_GNU_SOURCE test.cc
-D_FORTIFY_SOURCE=2 -mtune=generic -march=i686 -fpch-preprocess
-fstack-protector -o test.ii
ignoring nonexistent directory "/usr/local/include/i686-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i686-linux-gnu/4.4.5/../../../../i686-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i686-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.4
 /usr/include/c++/4.4/i686-linux-gnu
 /usr/include/c++/4.4/backward
 /usr/local/include
 /usr/lib/gcc/i686-linux-gnu/4.4.5/include
 /usr/lib/gcc/i686-linux-gnu/4.4.5/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic' '-march=i686'
 /usr/lib/gcc/i686-linux-gnu/4.4.5/cc1plus -fpreprocessed test.ii -quiet
-dumpbase test.cc -mtune=generic -march=i686 -auxbase test -version
-fstack-protector -o test.s
GNU C++ (Ubuntu/Linaro 4.4.4-14ubuntu5) version 4.4.5 (i686-linux-gnu)
    compiled by GNU C version 4.4.5, GMP version 4.3.2, MPFR version 3.0.0-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1fe36891f4a5f71e4a498e712867261c
test.cc: In function ‘int main()’:
test.cc:8: warning: extended initializer lists only available with -std=c++0x
or -std=gnu++0x
test.cc:8: internal compiler error: Segmentation fault


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/46848] ICE with initializer list for std::vector
  2010-12-08 12:07 [Bug c++/46848] New: ICE with initializer list for std::vector magicdice at hotmail dot com
@ 2010-12-08 12:31 ` redi at gcc dot gnu.org
  2010-12-08 12:33 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2010-12-08 12:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46848

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-08 12:31:45 UTC ---
I think this is a dup of PR 44045, which is fixed on trunk


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/46848] ICE with initializer list for std::vector
  2010-12-08 12:07 [Bug c++/46848] New: ICE with initializer list for std::vector magicdice at hotmail dot com
  2010-12-08 12:31 ` [Bug c++/46848] " redi at gcc dot gnu.org
@ 2010-12-08 12:33 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2010-12-08 12:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46848

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-08 12:33:39 UTC ---
Yes, with trunk this gets the new error added by the fix for PR 44045

ice.cc:5:59: error: assigning to an array from an initializer list

*** This bug has been marked as a duplicate of bug 44045 ***


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-08 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 12:07 [Bug c++/46848] New: ICE with initializer list for std::vector magicdice at hotmail dot com
2010-12-08 12:31 ` [Bug c++/46848] " redi at gcc dot gnu.org
2010-12-08 12:33 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).