Summary: | [4.6 Regression] ICE: in tree_nrv, at tree-nrv.c:155 with -fprofile-generate | ||
---|---|---|---|
Product: | gcc | Reporter: | Zdenek Sojka <zsojka> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, hubicka |
Priority: | P3 | Keywords: | ice-on-valid-code |
Version: | 4.6.0 | ||
Target Milestone: | 4.6.0 | ||
Host: | x86_64-pc-linux-gnu | Target: | x86_64-pc-linux-gnu |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2010-06-28 00:21:54 | |
Attachments: | reduced testcase (from g++.dg/lto/20090221_0.C) |
Description
Zdenek Sojka
2010-06-27 11:14:48 UTC
Created attachment 21015 [details] reduced testcase (from g++.dg/lto/20090221_0.C) Command line: $ g++ -O2 -fprofile-generate pr44687.C Works with: GNU C++ (GCC) version 4.6.0 20100621 (experimental) [trunk revision 161061] (x86_64-unknown-linux-gnu) So it must be in the last week. It is caused by revision 161382: http://gcc.gnu.org/ml/gcc-cvs/2010-06/msg01300.html This same ICE also happens w/o -fprofile-generate: regehr@john-home:~/volatile/bugs/tmp318$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/home/regehr/z/compiler-install/gcc-r161425-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r161425-install --program-prefix=r161425- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20100626 (experimental) (GCC) regehr@john-home:~/volatile/bugs/tmp318$ current-gcc -O2 small.c small.c: In function ‘func_72’: small.c:24:1: internal compiler error: in tree_nrv, at tree-nrv.c:155 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. regehr@john-home:~/volatile/bugs/tmp318$ cat small.c typedef int int32_t; typedef unsigned char uint8_t; struct S0 { uint8_t f0; }; struct S0 *g_18[7][5][1][1] = { }; struct S0 **g_17 = &g_18[0][3][0][0]; int32_t g_86; struct S0 func_72 (uint8_t p_73, struct S0 p_74); void int326 (struct S0 **p_67, int32_t p_68, int32_t * *const p_69, struct S0 *p_70) { struct S0 l_95 = { -1L }; func_72 (1L, func_72 (0, l_95)); } struct S0 func_72 (uint8_t p_73, struct S0 p_74) { int32_t *l_85 = &g_86; if (*l_85) lbl_94:*l_85 ^= 0; if (g_86) goto lbl_94; return **g_17; } Subject: Bug 44687 Author: hubicka Date: Mon Jun 28 15:51:25 2010 New Revision: 161500 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161500 Log: PR tree-optimization/44687 * gcc.c-torture/compile/pr44687.c PR tree-optimization/44687 * ipa-split.c (split_function): Use DECL_RESULT to store return value. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr44687.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-split.c trunk/gcc/testsuite/ChangeLog Fixed. |