From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26109 invoked by alias); 21 Jul 2013 03:30:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22921 invoked by uid 48); 21 Jul 2013 03:28:20 -0000 From: "cas43 at cs dot stanford.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57947] New: internal compiler error: Segmentation fault using extended initializer lists without -std=c++11 or -std=gnu++11 Date: Sun, 21 Jul 2013 03:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cas43 at cs dot stanford.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00931.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57947 Bug ID: 57947 Summary: internal compiler error: Segmentation fault using extended initializer lists without -std=3Dc++11 or -std=3Dgnu++11 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cas43 at cs dot stanford.edu Program: template class initializer_list {}; template struct D {D(std::initializer_list) {}}; D<0> d{1, 2, 3}; Compile like this: g++ prog.cpp Output: prog.cpp:8:12: warning: extended initializer lists only available with -std=3Dc++11 or -std=3Dgnu++11 [enabled by default] D<0> d{ ^ prog.cpp:9:11: error: in C++98 =E2=80=98std::d=E2=80=99 must be initialized= by constructor, not by =E2=80=98{...}=E2=80=99 1, 2, 3}; ^ prog.cpp:9:11: internal compiler error: Segmentation fault 0xaac4cf crash_signal ../../s-4.9/gcc/toplev.c:333 0x519ce3 contains_struct_check ../../s-4.9/gcc/tree.h:3803 0x519ce3 convert_like_real ../../s-4.9/gcc/cp/call.c:6055 0x51b671 build_over_call ../../s-4.9/gcc/cp/call.c:6943 0x517b3b build_new_method_call_1 ../../s-4.9/gcc/cp/call.c:7777 0x517b3b build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../s-4.9/gcc/cp/call.c:7847 0x518d12 build_special_member_call(tree_node*, tree_node*, vec**, tree_node*, int, int) ../../s-4.9/gcc/cp/call.c:7412 0x6657d7 expand_default_init ../../s-4.9/gcc/cp/init.c:1664 0x6657d7 expand_aggr_init_1 ../../s-4.9/gcc/cp/init.c:1765 0x66835a build_aggr_init(tree_node*, tree_node*, int, int) ../../s-4.9/gcc/cp/init.c:1516 0x52d01d build_aggr_init_full_exprs ../../s-4.9/gcc/cp/decl.c:5545 0x52d01d check_initializer ../../s-4.9/gcc/cp/decl.c:5680 0x54006d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../s-4.9/gcc/cp/decl.c:6349 0x6260fd cp_parser_init_declarator ../../s-4.9/gcc/cp/parser.c:16527 0x62673e cp_parser_simple_declaration ../../s-4.9/gcc/cp/parser.c:10946 0x6285a0 cp_parser_block_declaration ../../s-4.9/gcc/cp/parser.c:10827 0x63160b cp_parser_declaration ../../s-4.9/gcc/cp/parser.c:10724 0x6302dd cp_parser_declaration_seq_opt ../../s-4.9/gcc/cp/parser.c:10610 0x6304f0 cp_parser_namespace_body ../../s-4.9/gcc/cp/parser.c:15530 0x6304f0 cp_parser_namespace_definition ../../s-4.9/gcc/cp/parser.c:15511 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Version: Using built-in specs. COLLECT_GCC=3D/home/craig/new-gcc/i-4.9/bin/g++ COLLECT_LTO_WRAPPER=3D/home/craig/new-gcc/i-4.9/libexec/gcc/x86_64-unknown-= linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-4.9/configure --prefix=3D/home/craig/new-gcc/i-4.9 Thread model: posix gcc version 4.9.0 20130718 (experimental) (GCC) >>From gcc-bugs-return-426425-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 21 03:42:00 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 13194 invoked by alias); 21 Jul 2013 03:41:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 9474 invoked by uid 48); 21 Jul 2013 03:39:52 -0000 From: "cas43 at cs dot stanford.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57948] New: internal compiler error: in initialize_reference, at cp/call.c:9285 Date: Sun, 21 Jul 2013 03:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cas43 at cs dot stanford.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00932.txt.bz2 Content-length: 3991 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57948 Bug ID: 57948 Summary: internal compiler error: in initialize_reference, at cp/call.c:9285 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cas43 at cs dot stanford.edu With this input: struct Base { }; struct Derived : Base { struct Derived2 : Base { struct ConvertibleToBothDerivedRef { operator Derived&(); operator Derived2&(); void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerivedR= ef both) { Base &br1 =3D both; } }; }; }; compiled like this: g++ prog.cpp I get this output: prog.cpp: In member function =E2=80=98void Derived::Derived2::ConvertibleToBothDerivedRef::bind_lvalue_to_conv_lvalue_= ambig(Derived::Derived2::ConvertibleToBothDerivedRef)=E2=80=99: prog.cpp:12:29: error: conversion from =E2=80=98Derived::Derived2::ConvertibleToBothDerivedRef=E2=80=99 to =E2=80= =98Base&=E2=80=99 is ambiguous Base &br1 =3D both; ^ prog.cpp:10:18: note: candidates are: void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerived= Ref both) ^ prog.cpp:9:13: note: Derived::Derived2::ConvertibleToBothDerivedRef::operat= or Derived::Derived2&() operator Derived2&(); ^ prog.cpp:8:13: note: Derived::Derived2::ConvertibleToBothDerivedRef::operat= or Derived&() operator Derived&(); ^ prog.cpp:12:29: internal compiler error: in initialize_reference, at cp/call.c:9285 Base &br1 =3D both; ^ 0x52061e initialize_reference(tree_node*, tree_node*, int, int) ../../s-4.9/gcc/cp/call.c:9285 0x52d9a4 grok_reference_init ../../s-4.9/gcc/cp/decl.c:4762 0x52d9a4 check_initializer ../../s-4.9/gcc/cp/decl.c:5630 0x54006d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../s-4.9/gcc/cp/decl.c:6349 0x6260fd cp_parser_init_declarator ../../s-4.9/gcc/cp/parser.c:16527 0x62673e cp_parser_simple_declaration ../../s-4.9/gcc/cp/parser.c:10946 0x6285a0 cp_parser_block_declaration ../../s-4.9/gcc/cp/parser.c:10827 0x6296a0 cp_parser_declaration_statement ../../s-4.9/gcc/cp/parser.c:10471 0x612527 cp_parser_statement ../../s-4.9/gcc/cp/parser.c:9229 0x61382e cp_parser_statement_seq_opt ../../s-4.9/gcc/cp/parser.c:9509 0x613976 cp_parser_compound_statement ../../s-4.9/gcc/cp/parser.c:9463 0x624733 cp_parser_function_body ../../s-4.9/gcc/cp/parser.c:18257 0x624733 cp_parser_ctor_initializer_opt_and_function_body ../../s-4.9/gcc/cp/parser.c:18293 0x62578f cp_parser_function_definition_after_declarator ../../s-4.9/gcc/cp/parser.c:22271 0x60b49c cp_parser_late_parsing_for_member ../../s-4.9/gcc/cp/parser.c:22923 0x60b49c cp_parser_class_specifier_1 ../../s-4.9/gcc/cp/parser.c:19016 0x60d610 cp_parser_class_specifier ../../s-4.9/gcc/cp/parser.c:19040 0x60d610 cp_parser_type_specifier ../../s-4.9/gcc/cp/parser.c:14042 0x622ad9 cp_parser_decl_specifier_seq ../../s-4.9/gcc/cp/parser.c:11288 0x626599 cp_parser_simple_declaration ../../s-4.9/gcc/cp/parser.c:10878 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Compiler version: Using built-in specs. COLLECT_GCC=3D/home/craig/new-gcc/i-4.9/bin/g++ COLLECT_LTO_WRAPPER=3D/home/craig/new-gcc/i-4.9/libexec/gcc/x86_64-unknown-= linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../s-4.9/configure --prefix=3D/home/craig/new-gcc/i-4.9 Thread model: posix gcc version 4.9.0 20130718 (experimental) (GCC) >>From gcc-bugs-return-426426-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Jul 21 04:55:09 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 10846 invoked by alias); 21 Jul 2013 04:55:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 7098 invoked by uid 48); 21 Jul 2013 04:53:06 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/57620] Phantom terminator confuses raw string literal parsing. Date: Sun, 21 Jul 2013 04:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00933.txt.bz2 Content-length: 1366 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57620 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Jakub Jelinek --- Author: jakub Date: Sun Jul 21 02:28:03 2013 New Revision: 201091 URL: http://gcc.gnu.org/viewcvs?rev=201091&root=gcc&view=rev Log: PR preprocessor/57620 * lex.c (lex_raw_string): Undo phase1 and phase2 transformations between R" and final " rather than only in between R"del( and )del". * c-c++-common/raw-string-2.c (s12, u12, U12, L12): Remove. (main): Don't test {s,u,U,L}12. * c-c++-common/raw-string-13.c: New test. * c-c++-common/raw-string-14.c: New test. * c-c++-common/raw-string-15.c: New test. * c-c++-common/raw-string-16.c: New test. Added: trunk/gcc/testsuite/c-c++-common/raw-string-13.c trunk/gcc/testsuite/c-c++-common/raw-string-14.c trunk/gcc/testsuite/c-c++-common/raw-string-15.c trunk/gcc/testsuite/c-c++-common/raw-string-16.c Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/raw-string-2.c trunk/libcpp/ChangeLog trunk/libcpp/lex.c