[Bug tree-optimization/100453] [12 Regression] wrong code at -O1 and above since r12-434

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 11 12:24:03 GMT 2021


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

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It's SRA writing into a TREE_READONLY parameter:

void g (const struct a h)
{
  const <unnamed-signed:4> h$b;
  int c.0_1;
  int _2;
  int c.1_3;
  <unnamed-signed:4> _4;
  int _5;
  <unnamed-signed:4> _6;
  int _7;

  <bb 2> :
  h$b_14 = MEM[(struct a *)&h].b;
  goto <bb 4>; [INV]

  <bb 3> :
  MEM[(struct a *)&h].b = h$b_14;


More information about the Gcc-bugs mailing list