Bug 80970 - [7 Regression] internal compiler error in find_reloads, at reload.c:4077
Summary: [7 Regression] internal compiler error in find_reloads, at reload.c:4077
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 7.2
Assignee: Not yet assigned to anyone
URL: https://people.debian.org/~glaubitz/p...
Keywords:
: 81131 (view as bug list)
Depends on:
Blocks: 25111
  Show dependency treegraph
 
Reported: 2017-06-04 17:11 UTC by John Paul Adrian Glaubitz
Modified: 2017-06-20 10:29 UTC (History)
3 users (show)

See Also:
Host:
Target: m68k*-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-06-05 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Paul Adrian Glaubitz 2017-06-04 17:11:55 UTC
Trying to build pypy_5.6.0 on Debian/unstable/m68k with gcc-7 fails with an internal compiler error (see below). The issue does not show with gcc-6.

The preprocessed sources are unfortunately too large to be attached to this bug tracker. Hence they can be downloaded here:

> https://people.debian.org/~glaubitz/cc2Vfl4Z.out.gz
> https://people.debian.org/~glaubitz/cczrduRg.out.gz

Full build log here:

> https://people.debian.org/~glaubitz/pypy_5.6.0+dfsg-4_m68k.build.gz

I didn't paste the invocation line of the compiler because the compiler invocations above seemed unrelated (different source file names). For debugging, the preprocessed sources and the full log should be used anyway.

================================================================================

rpython_rlib.c: In function 'pypy_g__search__list_str.constprop':
rpython_rlib.c:83603:1: internal compiler error: in find_reloads, at reload.c:4077
 }
 ^
mmap: Permission denied
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.

================================================================================

rpython_rtyper_lltypesystem.c: In function 'pypy_g_ll_search__rpy_stringPtr_rpy_stringPtr_Signed_Si':
rpython_rtyper_lltypesystem.c:5965:1: internal compiler error: in find_reloads, at reload.c:4077
 }
 ^
mmap: Permission denied
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.

================================================================================

Preprocessed source stored into /<<BUILDDIR>>/pypy-5.6.0+dfsg/build-tmp/cc2Vfl4Z.out file, please attach this to your bugreport.

================================================================================

Preprocessed source stored into /<<BUILDDIR>>/pypy-5.6.0+dfsg/build-tmp/cczrduRg.out file, please attach this to your bugreport.
Comment 1 Martin Liška 2017-06-05 07:06:28 UTC
Can't download source files:
You don't have permission to access /~glaubitz/cc2Vfl4Z.out.gz on this server.
Comment 2 John Paul Adrian Glaubitz 2017-06-05 08:14:48 UTC
(In reply to Martin Liška from comment #1)
> Can't download source files:
> You don't have permission to access /~glaubitz/cc2Vfl4Z.out.gz on this
> server.

Oops, sorry. That should be fixed now.
Comment 3 Martin Liška 2017-06-05 08:56:42 UTC
Reduced test-case:

$ cat pr80970.i
int a, b, c, d, e;
void f ()
{
  long g, h;
  if (c)
    e = d;
  g = d & 31;
  h = 1 << g;
  a = e | h;
  b = a;
}

m68k-suse-linux-gcc-7 pr80970.i -c -O2
pr80970.i: In function 'f':
pr80970.i:11:1: internal compiler error: in find_reloads, at reload.c:4077
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.

Looks it's a 7 regression as GCC 6 cross compiler works for me.
Comment 4 Andreas Schwab 2017-06-19 14:46:38 UTC
7459c90a9a5687b47dfc019e649031fa0db02377 is the first bad commit
commit 7459c90a9a5687b47dfc019e649031fa0db02377
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sat Nov 19 17:52:04 2016 +0000

            PR target/25111
            * config/m68k/m68k.md (bsetdreg): New pattern.
            (bchgdreg, bclrdreg): Likewise.
    
            PR target/25111
            * gcc.target/m68k/pr25111.c: New test.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242623 138bc75d-0d04-0410-961f-82ee72b054a4
Comment 5 Andreas Schwab 2017-06-20 07:52:40 UTC
*** Bug 81131 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Schwab 2017-06-20 10:16:21 UTC
Author: schwab
Date: Tue Jun 20 10:15:47 2017
New Revision: 249401

URL: https://gcc.gnu.org/viewcvs?rev=249401&root=gcc&view=rev
Log:
PR target/80970
* config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
instead of "+d".

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr80970.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/m68k/m68k.md
Comment 7 Andreas Schwab 2017-06-20 10:28:04 UTC
Author: schwab
Date: Tue Jun 20 10:27:32 2017
New Revision: 249402

URL: https://gcc.gnu.org/viewcvs?rev=249402&root=gcc&view=rev
Log:
PR target/80970
* config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
instead of "+d".

Added:
    branches/gcc-7-branch/gcc/testsuite/gcc.dg/torture/pr80970.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/config/m68k/m68k.md
Comment 8 Andreas Schwab 2017-06-20 10:29:24 UTC
Fixed.