Bug 65568 - ptrmem8.C:9:9: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:7940
Summary: ptrmem8.C:9:9: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:7940
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 97825 108207 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-25 18:28 UTC by Rainer Emrich
Modified: 2022-12-24 20:32 UTC (History)
3 users (show)

See Also:
Host: x86_64-w64-mingw32
Target: x86_64-w64-mingw32
Build: x86_64-w64-mingw32
Known to work:
Known to fail:
Last reconfirmed: 2015-03-26 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Emrich 2015-03-25 18:28:45 UTC
Running the g++ testsuite I get the following ICE:

Executing on host: /opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/gcc/testsuite/g++/../../xg++ -B/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/gcc/testsuite/g++/../../ /opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C  -fno-diagnostics-show-caret -fdiagnostics-color=never  -nostdinc++ -I/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32 -I/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/x86_64-w64-mingw32/libstdc++-v3/include -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/libsupc++ -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/include/backward -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/testsuite/util -fmessage-length=0  -std=c++98  -pedantic-errors -Wno-long-long  -S   -o ptrmem8.s    (timeout = 300)
spawn /opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/gcc/testsuite/g++/../../xg++ -B/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/gcc/testsuite/g++/../../ /opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ -I/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32 -I/opt/devel/SCRATCH/tmp.5jnZ8G4weh/gcc-5.0.0/gcc-5.0.0/x86_64-w64-mingw32/libstdc++-v3/include -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/libsupc++ -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/include/backward -I/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 -pedantic-errors -Wno-long-long -S -o ptrmem8.s
D:/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C: In function 'void foo(void (A::*)())':
D:/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C:9:9: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:7940
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
D:/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C: In function 'void foo(void (A::*)())':
D:/opt/devel/gnu/src/gcc-mingw-w64/gcc-5.0.0/gcc/testsuite/g++.dg/other/ptrmem8.C:9:9: internal compiler error: in build_ptrmemfunc, at cp/typeck.c:7940
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

FAIL: g++.dg/other/ptrmem8.C  -std=c++98 (internal compiler error)
Comment 1 Richard Biener 2015-03-26 10:56:10 UTC
Can you run manually and provide a backtrace?
Comment 2 Kai Tietz 2015-03-26 11:12:06 UTC
Issue is related to -fms-extensions.  This option is for mingw targets on by default.  By the following patch issue in testsuite gets solved (it makes sense to apply this patch for such testcases, as here indeed -fno-ms-extensions is tested).  
The point - as already noticed and spoken with Jason - that some C++-extensions are buggy in C++-FE.

Index: ptrmem8.C
===================================================================
--- ptrmem8.C   (Revision 221690)
+++ ptrmem8.C   (Arbeitskopie)
@@ -1,5 +1,6 @@
 // PR c++/33844
 // { dg-do compile }
+// { dg-additional-options "-fno-ms-extensions" { target *-*-mingw* } }

 struct A {};
Comment 3 Andrew Pinski 2021-07-29 19:35:03 UTC
*** Bug 97825 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Pinski 2022-12-24 20:32:42 UTC
*** Bug 108207 has been marked as a duplicate of this bug. ***