------- Comment #17 from hubicka at gcc dot gnu dot org 2010-01-16 14:54 ------- Hi, strictly speaking, I would argue that Ada should not set COMMON flag for !PUBLIC variables since it has no effect: all static variables that have no initializer go to .common anyway. However same ICE is possible to trigger via static int a __attribute__ ((common)) and looking at varasm.c threre are multitude of reasons why COMMON flag is disqualified later. The checks are spred across the varasm.c and some of them are arguably late since things should be finalized after make_decl_rtl. So following patch moves the logic into visibility pass so it will now clear the flag instead of ICEing.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42068