Bug 43288 - [4.5 Regression] ICE in function_and_variable_visibility, at ipa.c:415
Summary: [4.5 Regression] ICE in function_and_variable_visibility, at ipa.c:415
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.5.0
: P2 normal
Target Milestone: 4.5.0
Assignee: Jan Hubicka
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2010-03-08 11:58 UTC by Richard Biener
Modified: 2010-03-10 19:36 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-03-10 15:40:37


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2010-03-08 11:58:16 UTC
static int a __attribute__((common));

ICEs like

> ./cc1 -quiet t.i
t.i:32:1: internal compiler error: in function_and_variable_visibility, at ipa.c:415
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

but instead should be rejected.

This bug was split out from PR42068.
Comment 1 H.J. Lu 2010-03-08 16:32:35 UTC
It is caused by revision 154121:

http://gcc.gnu.org/ml/gcc-cvs/2009-11/msg00342.html
Comment 2 Jan Hubicka 2010-03-10 15:40:37 UTC
Patch posted
Comment 3 Jan Hubicka 2010-03-10 19:33:52 UTC
Subject: Bug 43288

Author: hubicka
Date: Wed Mar 10 19:33:37 2010
New Revision: 157366

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157366
Log:

	PR c/43288
	* ipa.c (function_and_variable_visibility) Normalize COMMON bits.
	* varasm.c (get_variable_section): Don't do that here...
	(make_decl_rtl): ... and here.
	(do_assemble_alias): Produce decl RTL.
	(assemble_alias): Likewise.

	* gcc.dg/compile/pr43288.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr43288.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c

Comment 4 Jan Hubicka 2010-03-10 19:36:00 UTC
Fixed.