public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
@ 2010-11-29  4:38 miles at gnu dot org
  2010-11-29  4:58 ` [Bug c++/46701] " miles at gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  4:38 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: internal compiler error: in
                    build_data_member_initialization, at
                    cp/semantics.c:5503
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: miles@gnu.org


I don't know if this is the same as the other ICEs in
build_data_member_initialization, but it's at a different line number anyway...

Compiler version is:
g++ (Debian 20101128-1) 4.6.0 20101128 (experimental) [trunk revision 167220]

Here's the un-preprocessed source (preprocessed source attached):

  #include <string>
  #include <map>

  void f (const std::string &name, const std::string &val)
  {
    std::map<const std::string, std::string>::value_type (name, val);
  }


Compiled with:

  g++-snapshot -c -std=c++0x ,oink.cc


yields:

   In file included from
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_algobase.h:65:0,
            from
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/char_traits.h:41,
            from
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.6.0/../../../../include/c++/4.6.0/string:42,
            from ,oink.cc:1:
  
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:
In constructor 'constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&)
[with _T1 = const std::basic_string<char>, _T2 = std::basic_string<char>]':
   ,oink.cc:6:66:   instantiated from here
  
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:102:35:
internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5503
   Please submit a full bug report,
   with preprocessed source if appropriate.
   See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.

Thanks,

-miles


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
@ 2010-11-29  4:58 ` miles at gnu dot org
  2010-11-29  5:14 ` miles at gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  4:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from miles at gnu dot org 2010-11-29 04:25:03 UTC ---
Created attachment 22559
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22559
preprocessed source showing crash

Generated with: g++-snapshot -E -std=c++0x


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
  2010-11-29  4:58 ` [Bug c++/46701] " miles at gnu dot org
@ 2010-11-29  5:14 ` miles at gnu dot org
  2010-11-29  5:15 ` miles at gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  5:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from miles at gnu dot org 2010-11-29 04:30:16 UTC ---
BTW, sorry about the duplicate bugs.

Bugzilla complains about not being able to autodetect the attachment
content-type, and says "hit BACK and try again" -- but doesn't mention that the
bug was submitted anyway! [and of course there doesn't actually seem to be
anyway to specify the content-type of an attachment on the new-bug page...]


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
  2010-11-29  4:58 ` [Bug c++/46701] " miles at gnu dot org
  2010-11-29  5:14 ` miles at gnu dot org
@ 2010-11-29  5:15 ` miles at gnu dot org
  2010-11-29  5:16 ` miles at gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  5:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from miles at gnu dot org 2010-11-29 05:14:29 UTC ---
*** Bug 46697 has been marked as a duplicate of this bug. ***


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (3 preceding siblings ...)
  2010-11-29  5:16 ` miles at gnu dot org
@ 2010-11-29  5:16 ` miles at gnu dot org
  2010-11-29  5:22 ` miles at gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  5:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from miles at gnu dot org 2010-11-29 05:14:53 UTC ---
*** Bug 46698 has been marked as a duplicate of this bug. ***


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (2 preceding siblings ...)
  2010-11-29  5:15 ` miles at gnu dot org
@ 2010-11-29  5:16 ` miles at gnu dot org
  2010-11-29  5:16 ` miles at gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  5:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from miles at gnu dot org 2010-11-29 05:15:43 UTC ---
*** Bug 46700 has been marked as a duplicate of this bug. ***


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

* [Bug c++/46701] internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (4 preceding siblings ...)
  2010-11-29  5:16 ` miles at gnu dot org
@ 2010-11-29  5:22 ` miles at gnu dot org
  2010-11-29 14:58 ` [Bug c++/46701] [C++0x] ICE " hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: miles at gnu dot org @ 2010-11-29  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from miles at gnu dot org 2010-11-29 05:15:18 UTC ---
*** Bug 46699 has been marked as a duplicate of this bug. ***


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (5 preceding siblings ...)
  2010-11-29  5:22 ` miles at gnu dot org
@ 2010-11-29 14:58 ` hjl.tools at gmail dot com
  2010-12-09  1:02 ` gcc at abeckmann dot de
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-29 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.29 14:56:22
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-29 14:56:22 UTC ---
ICE on the preprocessed testcase is caused by revision 166165:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00051.html


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (6 preceding siblings ...)
  2010-11-29 14:58 ` [Bug c++/46701] [C++0x] ICE " hjl.tools at gmail dot com
@ 2010-12-09  1:02 ` gcc at abeckmann dot de
  2010-12-09 10:32 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gcc at abeckmann dot de @ 2010-12-09  1:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Beckmann <gcc at abeckmann dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc at abeckmann dot de

--- Comment #8 from Andreas Beckmann <gcc at abeckmann dot de> 2010-12-09 01:02:18 UTC ---
Another small minimized testcase for this problem which fails on 4.6 and
succeeds on 4.5:

===== 8< =====
struct A
{
        int i ;
} ;
struct B
{
        const A a ;

        constexpr
        B () : a ( A () )
        { }
} ;
===== >8 =====

$ g++-trunk -v -c -W -Wall -std=c++0x PR46701.min.ii
Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/software/x86_64/gcc-trunk
--program-suffix=-trunk --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.6.0 20101207 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-Wextra' '-Wall' '-std=c++0x' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'

/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus
-fpreprocessed PR46701.min.ii -quiet -dumpbase PR46701.min.ii -mtune=generic
-march=x86-64 -auxbase PR46701.min -Wextra -Wall -std=c++0x -version -o
/tmp/cc22qtoi.s
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.6.0 20101207 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20101207 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 58dd45b357216c1e9d23aab2b8f87581
PR46701.min.ii: In constructor ‘constexpr B::B()’:
PR46701.min.ii:11:4: internal compiler error: in
build_data_member_initialization, at cp/semantics.c:5489
Please submit a full bug report,


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (7 preceding siblings ...)
  2010-12-09  1:02 ` gcc at abeckmann dot de
@ 2010-12-09 10:32 ` paolo.carlini at oracle dot com
  2010-12-09 10:33 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-09 10:32 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-09 10:31:57 UTC ---
The patch for c++/46384 fixed this one too.

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


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (8 preceding siblings ...)
  2010-12-09 10:32 ` paolo.carlini at oracle dot com
@ 2010-12-09 10:33 ` paolo.carlini at oracle dot com
  2010-12-09 21:50 ` gcc at abeckmann dot de
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-09 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot
                   |                            |com

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-09 10:32:53 UTC ---
Sorry.

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


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (9 preceding siblings ...)
  2010-12-09 10:33 ` paolo.carlini at oracle dot com
@ 2010-12-09 21:50 ` gcc at abeckmann dot de
  2010-12-09 22:37 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gcc at abeckmann dot de @ 2010-12-09 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Andreas Beckmann <gcc at abeckmann dot de> 2010-12-09 21:50:26 UTC ---
I just retried with trunk r167662 and could still reproduce this bug for both
miles' code and my minimized test case
So it was *not* fixed by 46348. (But the testcase from 46348 now compiles
cleanly.)


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (10 preceding siblings ...)
  2010-12-09 21:50 ` gcc at abeckmann dot de
@ 2010-12-09 22:37 ` paolo.carlini at oracle dot com
  2010-12-10 13:18 ` paolo.carlini at oracle dot com
  2010-12-13 21:29 ` paolo.carlini at oracle dot com
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-09 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

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

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-09 22:37:23 UTC ---
Weird.


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (11 preceding siblings ...)
  2010-12-09 22:37 ` paolo.carlini at oracle dot com
@ 2010-12-10 13:18 ` paolo.carlini at oracle dot com
  2010-12-13 21:29 ` paolo.carlini at oracle dot com
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-10 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot
                   |                            |com

--- Comment #13 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-10 13:17:54 UTC ---
By the way, here and in c++/46877, the ICEs in library code - which I would
consider rather serious because prevent people from testing in C++0x mode quite
common uses of std::map - occur in a std::pair constructor decorated with
constexpr in a way not conforming to the letter of n3225. Thus, if we can't
really go through such issue in the constexpr code for 4.6.0 - because too
risky, or whatelse - I would propose removing for now the constexpr specifiers
from std::pair. Jason, what do you think?


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

* [Bug c++/46701] [C++0x] ICE in build_data_member_initialization, at cp/semantics.c:5503
  2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
                   ` (12 preceding siblings ...)
  2010-12-10 13:18 ` paolo.carlini at oracle dot com
@ 2010-12-13 21:29 ` paolo.carlini at oracle dot com
  13 siblings, 0 replies; 15+ messages in thread
From: paolo.carlini at oracle dot com @ 2010-12-13 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Paolo Carlini <paolo.carlini at oracle dot com> 2010-12-13 21:29:05 UTC ---
Thanks Jason. Fixed in Rev. 167770.


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

end of thread, other threads:[~2010-12-13 21:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29  4:38 [Bug c++/46701] New: internal compiler error: in build_data_member_initialization, at cp/semantics.c:5503 miles at gnu dot org
2010-11-29  4:58 ` [Bug c++/46701] " miles at gnu dot org
2010-11-29  5:14 ` miles at gnu dot org
2010-11-29  5:15 ` miles at gnu dot org
2010-11-29  5:16 ` miles at gnu dot org
2010-11-29  5:16 ` miles at gnu dot org
2010-11-29  5:22 ` miles at gnu dot org
2010-11-29 14:58 ` [Bug c++/46701] [C++0x] ICE " hjl.tools at gmail dot com
2010-12-09  1:02 ` gcc at abeckmann dot de
2010-12-09 10:32 ` paolo.carlini at oracle dot com
2010-12-09 10:33 ` paolo.carlini at oracle dot com
2010-12-09 21:50 ` gcc at abeckmann dot de
2010-12-09 22:37 ` paolo.carlini at oracle dot com
2010-12-10 13:18 ` paolo.carlini at oracle dot com
2010-12-13 21:29 ` paolo.carlini at oracle dot com

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).