http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52178
--- Comment #20 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-13 14:43:47 UTC --- (In reply to comment #19) > > Which should avoid the issue. But I suppose that variably_modified_type_p > > wrongly checks > > > > if (TREE_CODE (type) == QUAL_UNION_TYPE) > > RETURN_TRUE_IF_VAR (DECL_QUALIFIER (t)); > > > > ? It seems it should not look at DECL_QUALIFIER at all. > > I wouldn't disagree, but I think we should only tweak free_lang_data and > subsequent passes for 4.7. Yeah. I'm now getting further with Ada LTO bootstrap, but hit an ICE during optimization: /space/rguenther/src/svn/trunk/gcc/ada/sem_prag.adb: In function 'sem_prag__analyze_pragma': /space/rguenther/src/svn/trunk/gcc/ada/sem_prag.adb:383:0: internal compiler error: in forward_edge_to_pdom, at tree-ssa-dce.c:1153 Please submit a full bug report, with preprocessed source if appropriate. when built with --disable-werror, otherwise I'd see errors with warnings like ada/b_gnat1.adb:196:7: warning: type of 'locking_policy' does not match original declaration [enabled by default] In file included from /usr/include/unistd.h:563:0, from /space/rguenther/src/svn/trunk/gcc/ada/cstreams.c:268, from /usr/include/stdio.h:188, from <built-in>:10, from <built-in>:5, from <built-in>:78, from :9: /space/rguenther/src/svn/trunk/gcc/ada/init.c:96:7: note: previously declared here In file included from :101:0: The warning appears if the middle-end would not consider the types compatible and thus would, for example, assign different alias-sets when accessing the decl from the different modules.