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

            Bug ID: 94861
           Summary: Don't make undefined values 0
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

int f()
{
    int x = x;
    return x;
}

LLVM compiles this to a return instruction, not bothering to initialize the
result register as its value is undefined. GCC instead does `return 0` for
this.

Reply via email to