public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x
@ 2011-03-15 8:44 martin.kronbichler at it dot uu.se
2011-03-15 9:09 ` [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x redi at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: martin.kronbichler at it dot uu.se @ 2011-03-15 8:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
Summary: Internal compiler error on array of std::complex with
-std=cxx0x
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: martin.kronbichler@it.uu.se
gcc 4.6.0 weekly snapshot 20110312
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../configure --enable-languages=c,c++,fortran,objc,obj-c++,go
--prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --without-included-gettext
--enable-threads=posix --program-suffix=-4.6 --enable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror
--with-arch-32=i486 --with-tune=core2 --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-cpu=core2
Thread model: posix
gcc version 4.6.0 20110312 (experimental) (GCC)
With the following code:
#include <complex>
void test () {
std::complex<double> array[] = { std::complex<double>(0,1) };
}
I get:
$ g++ -std=c++0x -c complex_test.cc -o complex_test.o
complex_test.cc: In function ‘void test()’:
complex_test.cc:4:62: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
The code compiles fine without -std=c++0x, and it is also fine with gcc 4.5.2.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
@ 2011-03-15 9:09 ` redi at gcc dot gnu.org
2011-03-15 10:48 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2011-03-15 9:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.03.15 08:59:36
Summary|Internal compiler error on |[4.6/4.7 Regression]
|array of std::complex with |[C++0x] Internal compiler
|-std=c++0x |error on array of
| |std::complex with
| |-std=c++0x
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-15 08:59:36 UTC ---
confirmed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
2011-03-15 9:09 ` [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x redi at gcc dot gnu.org
@ 2011-03-15 10:48 ` rguenth at gcc dot gnu.org
2011-03-15 12:22 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-15 10:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
2011-03-15 9:09 ` [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x redi at gcc dot gnu.org
2011-03-15 10:48 ` rguenth at gcc dot gnu.org
@ 2011-03-15 12:22 ` jakub at gcc dot gnu.org
2011-03-15 13:38 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-15 12:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-15 12:15:13 UTC ---
Reduced testcase:
struct C
{
constexpr C (int x) : c (x) {}
int c;
};
void
foo ()
{
C a[] = { C (0) };
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
` (2 preceding siblings ...)
2011-03-15 12:22 ` jakub at gcc dot gnu.org
@ 2011-03-15 13:38 ` jakub at gcc dot gnu.org
2011-03-16 20:04 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-15 13:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-15 13:19:09 UTC ---
Regressed (expectedly) with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166167
The problem seems to be that the middle-end relies on indexes being filled in
in ctors for arrays, but the C++ FE in this case doesn't fill them in.
For POD arrays the indexes are added by process_init_constructor_array, but
that
isn't called in this case (both because check_initializer will do:
/* Don't call digest_init; it's unnecessary and will complain
about aggregate initialization of non-aggregate classes. */
flags |= LOOKUP_ALREADY_DIGESTED;
and also because it is called only for:
if (BRACE_ENCLOSED_INITIALIZER_P (init)
&& !TYPE_NON_AGGREGATE_CLASS (type))
return process_init_constructor (type, init);
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
` (4 preceding siblings ...)
2011-03-16 20:04 ` jason at gcc dot gnu.org
@ 2011-03-16 20:04 ` jason at gcc dot gnu.org
2011-03-16 20:23 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-16 20:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-16 20:04:13 UTC ---
Author: jason
Date: Wed Mar 16 20:04:06 2011
New Revision: 171068
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171068
Log:
PR c++/48132
* decl.c (check_array_designated_initializer): Allow integer index.
(reshape_init_array_1): Set index on the elements.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
` (3 preceding siblings ...)
2011-03-15 13:38 ` jakub at gcc dot gnu.org
@ 2011-03-16 20:04 ` jason at gcc dot gnu.org
2011-03-16 20:04 ` jason at gcc dot gnu.org
2011-03-16 20:23 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-16 20:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-16 20:03:17 UTC ---
Author: jason
Date: Wed Mar 16 20:03:12 2011
New Revision: 171065
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171065
Log:
PR c++/48132
* decl.c (check_array_designated_initializer): Allow integer index.
(reshape_init_array_1): Set index on the elements.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/decl.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
` (5 preceding siblings ...)
2011-03-16 20:04 ` jason at gcc dot gnu.org
@ 2011-03-16 20:23 ` jason at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-16 20:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48132
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jason at gcc dot gnu.org
Resolution| |FIXED
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-16 20:22:16 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-16 20:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 8:44 [Bug c++/48132] New: Internal compiler error on array of std::complex with -std=cxx0x martin.kronbichler at it dot uu.se
2011-03-15 9:09 ` [Bug c++/48132] [4.6/4.7 Regression] [C++0x] Internal compiler error on array of std::complex with -std=c++0x redi at gcc dot gnu.org
2011-03-15 10:48 ` rguenth at gcc dot gnu.org
2011-03-15 12:22 ` jakub at gcc dot gnu.org
2011-03-15 13:38 ` jakub at gcc dot gnu.org
2011-03-16 20:04 ` jason at gcc dot gnu.org
2011-03-16 20:04 ` jason at gcc dot gnu.org
2011-03-16 20:23 ` jason 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).