Diego Novillo wrote:
> With the memory SSA patches we fail gcc.dg/noncompile/920507-1.c:
>
> int *
> x(void)
> {
> register int *a asm("unknown_register"); /* { dg-error "invalid
> register" } */
> int *v[1] = {a};
> return v[1];
> }
>
> The expected error message on the invalid register used for 'a' does not
> trigger because the store into v[0] is dead and the the check for
> register validity is done during instantiation of RTL decl registers (in
> the case of dead stores, no RTL is instantiated for 'a' because it
> completely disappears from the IL stream).
Yes, this test case is valid; the code is ill-formed GNU C, since the
machine in question know not have a register named "unknown register".
> One could also argue that this check should be done closer to the FE,
> but that's orthogonal to the validity of this test case.
Yes, I think the check should be done closer to the FE.
--
Mark Mitchell
CodeSourcery
[EMAIL PROTECTED]
(650) 331-3385 x713