From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8840 invoked by alias); 12 Sep 2014 12:36:42 -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 8547 invoked by uid 48); 12 Sep 2014 12:36:37 -0000 From: "thibaut.lutz at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63241] New: Internal error in gimplify_init_constructor when using constexr and multidimensional arrays Date: Fri, 12 Sep 2014 12:36: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.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: thibaut.lutz at googlemail 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 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: 2014-09/txt/msg01502.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63241 Bug ID: 63241 Summary: Internal error in gimplify_init_constructor when using constexr and multidimensional arrays Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: thibaut.lutz at googlemail dot com I stumbled upon a weird regression bug. The test case below is working fine with GCC 4.8 and 4.9.0 but triggers an internal error on 4.9.1. I haven't tested 4.9.2. Any of these modifications would remove the error: - removing `constexpr` from the constructor at line 2 - using `0` instead of `i` in the second array element constructor at line 8 - using `const int i` instead of `int i` at line 6 - using a 1D array instead of a 2D array at line 7 So I believe the example below cannot be reduced further. However somehow the combination of `constexpr` constructor and multidimensi= onal array is causing the compiler to crash. Details: * GCC version: 4.9.1 built with default config * System: x86_64 GNU/Linux * Command line: c++ -std=3Dc++11 bug.cpp * Minimal example: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> struct A { constexpr A(int){} }; int main() { int i =3D 1; A array[2][2] =3D {{{0}, {i}}, {{0}, {0}}}; } <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< * Output: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> bug.cpp: In function =E2=80=98int main()=E2=80=99: bug.cpp:9:16: internal compiler error: in gimplify_init_constructor, at gimplify.c:4007 {{0}, {0}}}; ^ 0x7f6213 gimplify_init_constructor ../.././gcc/gimplify.c:4007 0x7f6dee gimplify_modify_expr_rhs ../.././gcc/gimplify.c:4167 0x7f6ec4 gimplify_modify_expr ../.././gcc/gimplify.c:4486 0x7f7dda gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:7627 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 0x7f806a gimplify_cleanup_point_expr ../.././gcc/gimplify.c:5149 0x7f806a gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:7990 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 0x7f8d3b gimplify_statement_list ../.././gcc/gimplify.c:1432 0x7f8d3b gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:8042 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 0x7f806a gimplify_cleanup_point_expr ../.././gcc/gimplify.c:5149 0x7f806a gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:7990 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 0x7f8d3b gimplify_statement_list ../.././gcc/gimplify.c:1432 0x7f8d3b gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:8042 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 0x7fb56b gimplify_bind_expr ../.././gcc/gimplify.c:1099 0x7f7fc0 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../.././gcc/gimplify.c:7824 0x7facd6 gimplify_stmt(tree_node**, gimple_statement_base**) ../.././gcc/gimplify.c:5373 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-461669-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 12 12:45:26 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 13719 invoked by alias); 12 Sep 2014 12:45: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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 13646 invoked by uid 48); 12 Sep 2014 12:45:21 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/62631] gcc.dg/tree-ssa/ivopts-lt-2.c FAILs Date: Fri, 12 Sep 2014 12:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status component assigned_to Message-ID: In-Reply-To: References: 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: 2014-09/txt/msg01503.txt.bz2 Content-length: 955 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D62631 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|tree-optimization |target Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc do= t gnu.org --- Comment #10 from Eric Botcazou --- > * For the mult part, rtx_code calls sparc_rtx_cost, which has >=20 > case MULT: > if (float_mode_p) > *total =3D sparc_costs->float_mul; > else if (! TARGET_HARD_MUL) > *total =3D COSTS_N_INSNS (25); >=20 > On SPARCv9/-m64, TARGET_HARD_MUL is false, so we get the 25*4 =3D 100 p= art, > unlike v8, which explains why the test only fails for 64-bit. Ugh, thanks for spotting it, this looks like an annoying oversight. >>From gcc-bugs-return-461670-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 12 12:56:44 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 18696 invoked by alias); 12 Sep 2014 12:56:44 -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 18653 invoked by uid 48); 12 Sep 2014 12:56:39 -0000 From: "wbrana at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/63242] New: memory starvation caused by flatten attribute Date: Fri, 12 Sep 2014 12:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wbrana at gmail 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 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: 2014-09/txt/msg01504.txt.bz2 Content-length: 977 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63242 Bug ID: 63242 Summary: memory starvation caused by flatten attribute Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: wbrana at gmail dot com forwarded from https://bugs.freedesktop.org/show_bug.cgi?id=77580 Hello, I've been testing GCC 4.9 for a virtual gentoo machine and I noticed that you us flatten attribute in source code. In case of src/sna/sna_glyphs.c flatten functions, inliner inlines about 3.3M functions and crashes because of no free memory (I have 8GB memory). Please notice that LTO has ability to optimize whole program. As a result, it sees almost all function bodies and that leads to enormous inlining. Suggested patch removes these flatten attributes for selected functions. Thank you, MArtin