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

            Bug ID: 78965
           Summary: [7 Regression] Invalid -fprintf-return-value
                    optimization
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

int
main ()
{
  int a = 5, b = 6;
  int c = __builtin_snprintf (0, 0, "a%nb%nc", &a, &b);
  if (a + b + c != 6)
    __builtin_abort ();
  return 0;
}

is miscompiled since r242674 at -O2.

Reply via email to