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

            Bug ID: 94611
           Summary: gccgo hangs (infinite loop) on complex projects,
                    seemingly in simplify-rtx.c/simplify_plus_minus
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: gcc at octaforge dot org
                CC: cmang at google dot com
  Target Milestone: ---

Created attachment 48283
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48283&action=edit
debugger steps

Attempting to compile complicated projects, such as bootstrapping the official
Go compiler (regardless of version), using gccgo will result in the gc1 process
entering infinite loop.

Configuration:

- GCC 9.3.0 (as far as I know, all 9.x series are known to do this, but I had
it work on some version of 8.x some time ago)
- ppc64le architecture (seems to affect at very least all other PowerPC)
- Linux

The gc1 process will keep running forever and keep growing in RSS.

By attaching into the process, I was able to narrow it down to
'simplify_plus_minus' from simplify-rtx.c.

Unfortunately, I wasn't able to isolate a trivial test case. It seems to happen
when building any sufficiently complex project. Trivial things build alright,
and gccgo can also bootstrap itself (when building a cross-toolchain).

I've never seen this happen with C/C++, so I suspect the gccgo frontend is
generating bogus data that the backend can't process.

Attached is the debugger output stepping through the call, one whole iteration,
on GCC 9.3.0.

Reply via email to