User account creation filtered due to spam.

Bug 22061 - [3.4 Regression] internal compiler error: in find_function_data, at function.c:317
Summary: [3.4 Regression] internal compiler error: in find_function_data, at function....
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: 3.4.5
Keywords: ice-on-valid-code, monitored, patch
Depends on:
Reported: 2005-06-14 13:07 UTC by Gareth Evans
Modified: 2005-09-02 12:36 UTC (History)
2 users (show)

See Also:
Known to work: 3.3.3 4.0.0 4.1.0
Known to fail: 3.4.0
Last reconfirmed: 2005-08-01 15:09:06

Code for Bug 22061 (263 bytes, text/plain)
2005-06-14 13:09 UTC, Gareth Evans

Note You need to log in before you can comment on or make changes to this bug.
Description Gareth Evans 2005-06-14 13:07:58 UTC
The piece of code attached compiles correctly if the returnZero function is
removed or commented out; however the code does not compile on this machine "as is".

gcc -v -save-temps fsabug.c -o fsabug -O4
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728
 /usr/libexec/cc1 -E -quiet -v -D_LONGLONG fsabug.c -O4 -o fsabug.i
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /usr/libexec/cc1 -fpreprocessed fsabug.i -quiet -dumpbase fsabug.c -auxbase
fsabug -O4 -version -o fsabug.s
GNU C version 3.4.2 [FreeBSD] 20040728 (i386-fbsdproj-freebsd)
        compiled by GNU C version 3.4.2 [FreeBSD] 20040728.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
fsabug.c: In function `fillTable':
fsabug.c:22: internal compiler error: in find_function_data, at function.c:317
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.
Comment 1 Gareth Evans 2005-06-14 13:09:31 UTC
Created attachment 9087 [details]
Code for Bug 22061
Comment 2 Andrew Pinski 2005-06-14 13:16:18 UTC
Confirmed, only a 3.4 regression.
Comment 3 Volker Reichelt 2005-06-14 15:57:12 UTC
Even shorter testcase:

int N = 1;

void foo() {}

void bar(int a[1][N])
    a[0][0] = 0;
Comment 4 2005-08-01 15:09:06 UTC
It looks like there's lots of interesting breakage in this area. ;)
Testing a patch.
Comment 5 2005-08-01 16:28:48 UTC
Reclassifying as a C frontend bug.
Comment 8 CVS Commits 2005-09-02 12:35:21 UTC
Subject: Bug 22061

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	2005-09-02 12:34:58

Modified files:
	gcc            : ChangeLog c-decl.c c-objc-common.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: pr22061-1.c pr22061-2.c 
	                                     pr22061-3.c pr22061-4.c 

Log message:
	PR c/22061
	* c-decl.c (push_parm_decl): Push and pop x_dont_save_pending_sizes_p
	around the call to grokdeclarator.  Call grokdeclarator with the
	field set to 0.
	(store_parm_decls): Always store the pending_sizes in cfun.
	(c_expand_body_1): Call put_pending_sizes.
	* c-objc-common.c (c_cannot_inline_tree_fn): Always check


Comment 9 2005-09-02 12:36:15 UTC
Applied to 3.4.  Testcases also applied to 4.0 and mainline.