public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/52178] New: [4.7 regression] Ada bootstrap failure in LTO mode Date: Wed, 08 Feb 2012 21:37:00 -0000 [thread overview] Message-ID: <bug-52178-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52178 Bug #: 52178 Summary: [4.7 regression] Ada bootstrap failure in LTO mode Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: lto AssignedTo: unassigned@gcc.gnu.org ReportedBy: ebotcazou@gcc.gnu.org Build: x86_64-*-linux The problem has been present for months despite the various LTO changes. The typical error message issued during LTRANS is: /home/eric/svn/gcc/gcc/ada/lib-load.adb: In function 'lib__load__load_unit': /home/eric/svn/gcc/gcc/ada/lib-load.adb:344:0: error: type mismatch in component reference atree__atree_private_part__node_record___is_extension___XVN atree__atree_private_part__node_record___is_extension___XVN # VUSE <.MEM_328> T142b_492 = *atree__atree_private_part__nodes__table.19_489[D.105830_491].is_extension___XVN.S0.sloc; It's a type mismatch between a COMPONENT_REF and the FIELD_DECL (operand #1). Everything is OK during compilation and the problem is apparently already there when LTRANS kicks in, so the problem is probably in WPA. As far as I can see, it merges 2 equivalent types and then updates the cache (uniquify_nodes): /* If we're going to replace an element which we'd still visit in the next iterations, we wouldn't handle it, so do it here. We do have to handle it even though the field_decl itself will be removed, as it could refer to e.g. integer_cst which we wouldn't reach via any other way, hence they (and their type) would stay uncollected. */ /* ??? We should rather make sure to replace all references to f2 with f1. That means handling COMPONENT_REFs and CONSTRUCTOR elements in lto_fixup_types and special-case the field-decl operand handling. */ if (ix < i) lto_fixup_types (f2); streamer_tree_cache_insert_at (cache, f1, ix); But, while the types of the old set and the new set of fields are compatible in GIMPLE, there is at least one field for which the type isn't compatible in the middle-end sense, and the type verifier chokes. I'm a little at a loss as to how this is supposed to work: should the type of the COMPONENT_REF be updated too, i.e is that the ??? above? Should this be handled via TYPE_CANONICAL, i.e the old and new type must have the same? Or should this be patched up in input_gimple_stmt, similarly to what is already done: /* Fixup FIELD_DECLs in COMPONENT_REFs, they are not handled by decl merging. */ if (TREE_CODE (op) == ADDR_EXPR) op = TREE_OPERAND (op, 0); while (handled_component_p (op)) Any hint is welcome!
next reply other threads:[~2012-02-08 21:37 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-08 21:37 ebotcazou at gcc dot gnu.org [this message] 2012-02-10 15:10 ` [Bug lto/52178] " rguenth at gcc dot gnu.org 2012-02-10 17:51 ` ebotcazou at gcc dot gnu.org 2012-02-13 11:35 ` rguenth at gcc dot gnu.org 2012-02-13 11:54 ` ebotcazou at gcc dot gnu.org 2012-02-13 11:58 ` rguenther at suse dot de 2012-02-13 12:18 ` ebotcazou at gcc dot gnu.org 2012-02-13 12:29 ` rguenther at suse dot de 2012-02-13 12:39 ` ebotcazou at gcc dot gnu.org 2012-02-13 13:29 ` rguenth at gcc dot gnu.org 2012-02-13 13:43 ` rguenth at gcc dot gnu.org 2012-02-13 13:45 ` rguenth at gcc dot gnu.org 2012-02-13 13:53 ` ebotcazou at gcc dot gnu.org 2012-02-13 13:54 ` ebotcazou at gcc dot gnu.org 2012-02-13 13:56 ` ebotcazou at gcc dot gnu.org 2012-02-13 14:04 ` rguenther at suse dot de 2012-02-13 14:13 ` ebotcazou at gcc dot gnu.org 2012-02-13 14:14 ` rguenther at suse dot de 2012-02-13 14:19 ` rguenther at suse dot de 2012-02-13 14:22 ` ebotcazou at gcc dot gnu.org 2012-02-13 14:44 ` rguenth at gcc dot gnu.org 2012-02-13 17:07 ` ebotcazou at gcc dot gnu.org 2012-02-14 8:41 ` rguenth at gcc dot gnu.org 2012-02-15 0:11 ` ebotcazou at gcc dot gnu.org 2012-02-15 0:12 ` ebotcazou at gcc dot gnu.org 2012-05-25 20:28 ` ebotcazou at gcc dot gnu.org 2012-05-25 20:30 ` ebotcazou at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52178-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).