https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101882

--- Comment #25 from chenglulu <chenglulu at loongson dot cn> ---
(In reply to Segher Boessenkool from comment #24)
> (In reply to Xi Ruoyao from comment #21)
> > (In reply to Segher Boessenkool from comment #20)
> > > (In reply to Peter Bergner from comment #17)
> > > > The reason operands 0, 1 and 4 all use the register r23, is that each
> > > > operand is using the same pseudo, coming from variable "x", which is a 
> > > > user
> > > > defined hard register:
> > > > 
> > > >    register long x asm ("s0");
> > > 
> > > So, user error.
> > 
> > The user cannot anticipate what the RTL will become like after optimization
> > passes at all.
> 
> What?  No.  The user can assume that (barring errors in the compiler) the
> compiler will at any point have an instruction stream that faithfully
> implements what the input code expressed.
> 
> And if the input is non-sensical, the compiler output will be as well, or the
> compiler can give up in some cases.
> 
I also don't quite agree that this is a user error. If the user's code follows
the C standard, shouldn't the compiler ICE even if the output doesn't make
sense?

Reply via email to