[PATCH] On PPC32 GCC9 or later can throw an ICE when built with older GCCs

Gustavo Romero gromero@linux.ibm.com
Mon Apr 6 23:44:45 GMT 2020

When GCC9 is built with older GCC (4.7) on FreeBSD 32-bit on PowerPC an ICE 
is generated on stage 1 when selftests are performed.

After an investigation the root cause was traced to an unnecessary and 
harmful instantiation of a new dump_context singleton class in order to
simply get the current activated instance.

I was only able to reproduce it on FreeBSD 32-bit but it can affect other
32-bit OSs in my understanding, and even 64-bit on certain cases I believe,
although I was not able to reproduce it on 64-bit FreeBSD or Linux.

On FreeBSD 12 32-bit the bug reproduces 100% when GCC9 is built with base
GCC 4.7. For additional details, please see:

* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242506 and 
* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243666

Gustavo Romero (1):
  Fix use of singleton in optinfo framework

 gcc/dumpfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


More information about the Gcc-patches mailing list