On 02/08/2016 07:26 AM, Bernd Schmidt wrote:
On 12/21/2015 08:39 PM, Jeff Law wrote:
On 12/18/2015 11:38 AM, Bernd Schmidt wrote:
In an earlier fix, the following change was made in varasm.c for invalid
register variables:

--- trunk/gcc/varasm.c    2014/08/26 14:59:59    214525
+++ trunk/gcc/varasm.c    2014/08/26 17:06:31    214526
@@ -1371,6 +1371,11 @@ make_decl_rtl (tree decl)
        /* As a register variable, it has no section.  */
        return;
      }
+      /* Avoid internal errors from invalid register
+     specifications.  */
+      SET_DECL_ASSEMBLER_NAME (decl, NULL_TREE);
+      DECL_HARD_REGISTER (decl) = 0;
+      return;
      }

As seen in PR67639, this makes the IL inconsistent and triggers another
internal error where we expect to see an SSA_NAME instead of a VAR_DECL.

The following patch extends the above slightly, by also setting
DECL_EXTERNAL to pretend that the erroneous variable is actually a
global.

Bootstrapped and tested on x86_64-linux, ok?
OK.

Turns out 65702 is a dup and this should go into gcc-5 as well. Ok to
backport?
Yes.

Thanks,
jeff

Reply via email to