From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2821 invoked by alias); 21 Oct 2013 16:58:33 -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 2775 invoked by uid 48); 21 Oct 2013 16:58:30 -0000 From: "rmansfield at qnx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58827] New: ICE in cxx_eval_constant_expression Date: Mon, 21 Oct 2013 16:58: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: rmansfield at qnx dot com 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 attachments.created 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-10/txt/msg01521.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58827 Bug ID: 58827 Summary: ICE in cxx_eval_constant_expression Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rmansfield at qnx dot com Created attachment 31062 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D31062&action=3Dedit preprocessed src Two testcases reproduce the ICE in cxx_eval_constant_expression on gcc 4.8 = and 4.9 (including fix for 58466) $ ./xgcc -v Using built-in specs. COLLECT_GCC=3D./xgcc Target: x86_64-unknown-linux-gnu Configured with: ../configure --disable-bootstrap --enable-languages=3Dc++ --enable-checking=3Dyes Thread model: posix gcc version 4.9.0 20131021 (experimental) [trunk revision 203899] (GCC)=20 $ ./xg++ -B. -std=3Dc++11 ~/ice.ii /home/ryan/ice.ii: In function =E2=80=98void f(int)=E2=80=99: /home/ryan/ice.ii:1:80: internal compiler error: unexpected expression =E2=80=98static_cast(x)=E2=80=99 of kind static_cast_expr template void f(int x) { const unsigned y{static_cast(x)}; } =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ^ 0x6cdfa5 cxx_eval_constant_expression ../../gcc/cp/semantics.c:9660 0x6d0f76 cxx_eval_outermost_constant_expr ../../gcc/cp/semantics.c:9680 0x6d3c2b maybe_constant_value(tree_node*) ../../gcc/cp/semantics.c:9790 0x5ddf8d check_narrowing(tree_node*, tree_node*) ../../gcc/cp/typeck2.c:842 0x55568f check_initializer ../../gcc/cp/decl.c:5669 0x568686 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/cp/decl.c:6253 0x655a56 cp_parser_init_declarator ../../gcc/cp/parser.c:16640 0x65731e cp_parser_simple_declaration ../../gcc/cp/parser.c:11054 0x63add0 cp_parser_block_declaration ../../gcc/cp/parser.c:10935 0x63be90 cp_parser_declaration_statement ../../gcc/cp/parser.c:10582 0x63c547 cp_parser_statement ../../gcc/cp/parser.c:9333 0x63d7fe cp_parser_statement_seq_opt ../../gcc/cp/parser.c:9611 0x63d946 cp_parser_compound_statement ../../gcc/cp/parser.c:9565 0x650f83 cp_parser_function_body ../../gcc/cp/parser.c:18408 0x650f83 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:18444 0x65530f cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:22452 0x656063 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.c:22373 0x656063 cp_parser_init_declarator ../../gcc/cp/parser.c:16419 0x656444 cp_parser_single_declaration ../../gcc/cp/parser.c:22766 0x656750 cp_parser_template_declaration_after_export ../../gcc/cp/parser.c:22568 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $ ./xg++ -B. -std=3Dc++11 ~/ice2.ii /home/ryan/ice2.ii: In function =E2=80=98void f(int)=E2=80=99: /home/ryan/ice2.ii:3:56: internal compiler error: unexpected expression =E2= =80=98g=E2=80=99 of kind overload template void f(int x) { const int a {g(x)}; } ^ 0x6cdfa5 cxx_eval_constant_expression ../../gcc/cp/semantics.c:9660 0x6cc7a6 cxx_eval_call_expression ../../gcc/cp/semantics.c:8244 0x6cdeef cxx_eval_constant_expression ../../gcc/cp/semantics.c:9367 0x6d0f76 cxx_eval_outermost_constant_expr ../../gcc/cp/semantics.c:9680 0x6d3c2b maybe_constant_value(tree_node*) ../../gcc/cp/semantics.c:9790 0x5ddf8d check_narrowing(tree_node*, tree_node*) ../../gcc/cp/typeck2.c:842 0x55568f check_initializer ../../gcc/cp/decl.c:5669 0x568686 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/cp/decl.c:6253 0x655a56 cp_parser_init_declarator ../../gcc/cp/parser.c:16640 0x65731e cp_parser_simple_declaration ../../gcc/cp/parser.c:11054 0x63add0 cp_parser_block_declaration ../../gcc/cp/parser.c:10935 0x63be90 cp_parser_declaration_statement ../../gcc/cp/parser.c:10582 0x63c547 cp_parser_statement ../../gcc/cp/parser.c:9333 0x63d7fe cp_parser_statement_seq_opt ../../gcc/cp/parser.c:9611 0x63d946 cp_parser_compound_statement ../../gcc/cp/parser.c:9565 0x650f83 cp_parser_function_body ../../gcc/cp/parser.c:18408 0x650f83 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:18444 0x65530f cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:22452 0x656063 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.c:22373 0x656063 cp_parser_init_declarator ../../gcc/cp/parser.c:16419 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. >>From gcc-bugs-return-432379-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 21 17:01:54 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 9037 invoked by alias); 21 Oct 2013 17:01:54 -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 8995 invoked by uid 48); 21 Oct 2013 17:01:50 -0000 From: "bugzilla@poradnik-webmastera.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/58828] New: Problem compiling gcc 4.8.2 using gcc 4.4.6 Date: Mon, 21 Oct 2013 17:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bugzilla@poradnik-webmastera.com 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg01523.txt.bz2 Content-length: 2906 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58828 Bug ID: 58828 Summary: Problem compiling gcc 4.8.2 using gcc 4.4.6 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: bugzilla@poradnik-webmastera.com I am trying to build gcc 4.8.2, and I got following compilation error: make[3]: Entering directory `[path]/gcc/obj/gcc' g++ -g -fkeep-inline-functions -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genconstants \ build/genconstants.o build/read-md.o build/errors.o ../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a build/genconstants ../../gcc-4.8.2/gcc/config/i386/i386.md \ > tmp-constants.h /bin/sh ../../gcc-4.8.2/gcc/../move-if-change tmp-constants.h insn-constants.h echo timestamp > s-constants g++ -g -fkeep-inline-functions -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/gengtype \ build/gengtype.o build/errors.o build/gengtype-lex.o build/gengtype-parse.o build/gengtype-state.o build/version.o ../build-x86_64-unknown-linux-gnu/libiberty/libiberty.a build/gengtype.o: In function `double_int::operator*=(double_int)': [path]/gcc/obj/gcc/../../gcc-4.8.2/gcc/double-int.h:263: undefined reference to `double_int::operator*(double_int) const' build/gengtype.o: In function `double_int::operator+=(double_int)': [path]/gcc/obj/gcc/../../gcc-4.8.2/gcc/double-int.h:270: undefined reference to `double_int::operator+(double_int) const' build/gengtype.o: In function `double_int::operator-=(double_int)': [path]/gcc/obj/gcc/../../gcc-4.8.2/gcc/double-int.h:277: undefined reference to `double_int::operator-(double_int) const' collect2: ld returned 1 exit status make[3]: *** [build/gengtype] Error 1 make[3]: Leaving directory `[path]/gcc/obj/gcc' gcc is configured this way: ../gcc-4.8.2/configure --prefix=[myprefix] --enable-languages=c,c++ --disable-nls I compile with sources for all needed tools and libs unpacked into gcc dir. Here are versions: binutils-2.23.2.tar.bz2 cloog-0.18.0.tar.gz gcc-4.8.2.tar.bz2 gmp-5.1.3.tar.bz2 isl-0.11.1.tar.bz2 mpc-1.0.1.tar.gz mpfr-3.1.2.tar.bz2 gcc --version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.