[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-12-18 Thread silver24k at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #11 from Yu Simin silver24k at gmail dot com 2010-12-19 06:38:18 
UTC ---
my test case

#include stdarg.h

template typename _T
void 
foo (long double *p, va_list argptr)
  {
*p = va_arg (argptr, long double);
  }

void 
bar (va_list ap)
  {
long double argdata;
foochar (argdata, ap);
  }


still causes this ICE against current trunk:
just
g++ -v -c ice.cpp

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/snowfishroot/mingw/bin/../libexec/gcc/mingw32/4.6.0/lto-wrapper.exe
Target: mingw32
Configured with: ../../../gcc_trunk/configure --build=x86_64-unknown-linux-gnu
--host=mingw32 --target=mingw32 --prefix=/mingw --with-pkgversion='MinGW GCC
4.5' --disable-win32-registry --enable-shared --enable-static --enable-libgomp
--enable-version-specific-runtime-libs --with-gmp=/mingw --with-mpfr=/mingw
--with-ppl=/mingw --with-cloog=/mingw --enable-libstdcxx-debug
--with-build-time-tools=/platform/cross-on-linux/mingw --disable-nls
--with-mpc=/mingw --enable-languages=c,c++ --enable-lto --disable-plugin
--enable-checking=release --enable-sjlj-exceptions
Thread model: win32
gcc version 4.6.0 20101218 (experimental) mingw-20090616 (MinGW GCC 4.5) 
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic'
'-march=pentiumpro'
 c:/snowfishroot/mingw/bin/../libexec/gcc/mingw32/4.6.0/cc1plus.exe -quiet -v
-iprefix c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/ -D__MSVCRT_DLL__
ice.cpp -quiet -dumpbase ice.cpp -mtune=generic -march=pentiumpro -auxbase ice
-version -o D:\Temp\ccjWK4lv.s
GNU C++ (MinGW GCC 4.5) version 4.6.0 20101218 (experimental) mingw-20090616
(mingw32)
compiled by GNU C version 4.6.0 20101218 (experimental) mingw-20090616, GMP
version 5.0.1, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/../../../../mingw32/include
ignoring duplicate directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/include/c++
ignoring duplicate directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/include/c++/mingw32
ignoring duplicate directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/include/c++/backward
ignoring duplicate directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/include
ignoring nonexistent directory /mingw/include
ignoring duplicate directory c:/snowfishroot/mingw/lib/gcc/../../include
ignoring duplicate directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/include-fixed
ignoring nonexistent directory
c:/snowfishroot/mingw/lib/gcc/../../lib/gcc/mingw32/4.6.0/../../../../mingw32/include
ignoring nonexistent directory /mingw/include
#include ... search starts here:
#include ... search starts here:
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/include/c++
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/include/c++/mingw32
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/include/c++/backward
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/include
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/../../../../include
 c:\snowfishroot\mingw\bin\../lib/gcc/mingw32/4.6.0/include-fixed
End of search list.
GNU C++ (MinGW GCC 4.5) version 4.6.0 20101218 (experimental) mingw-20090616
(mingw32)
compiled by GNU C version 4.6.0 20101218 (experimental) mingw-20090616, GMP
version 5.0.1, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 513ac793d2c1b06037d476024361a9f7
ice.cpp: In function 'void foo(long double*, char*) [with _T = char, va_list =
char*]':
ice.cpp:14:28:   instantiated from here
ice.cpp:7:5: internal compiler error: in tsubst_copy, at cp/pt.c:11682
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

maybe I should file another PR ?


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P1  |P3
 Status|NEW |WAITING

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-10 
16:26:46 UTC ---
Back to P3, as we don't have a testcase that doesn't work right now.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #6 from Marc Glisse marc.glisse at normalesup dot org 2010-11-10 
17:01:42 UTC ---
templatetypename class vector { };
struct A{};
template class T1
void complete_test(vectorT1 data1){
A drop=A();
}
int main(){
  vectordouble vect1;
  complete_test(vect1);
}

Fine with -std=c++98 but not with -std=c++0x:
bug.cpp: In function ‘void complete_test(vectorT1) [with T1 = double]’:
bug.cpp:9:22:   instantiated from here
bug.cpp:5:11: internal compiler error: in tsubst_copy, at cp/pt.c:11677


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #7 from H.J. Lu hjl.tools at gmail dot com 2010-11-10 17:23:42 
UTC ---
(In reply to comment #6)
 templatetypename class vector { };
 struct A{};
 template class T1
 void complete_test(vectorT1 data1){
 A drop=A();
 }
 int main(){
   vectordouble vect1;
   complete_test(vect1);
 }
 
 Fine with -std=c++98 but not with -std=c++0x:
 bug.cpp: In function ‘void complete_test(vectorT1) [with T1 = double]’:
 bug.cpp:9:22:   instantiated from here
 bug.cpp:5:11: internal compiler error: in tsubst_copy, at cp/pt.c:11677

This is caused by revision 166167:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00053.html


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-10 
17:34:02 UTC ---
The #c6 testcase doesn't appear related to the original one, thus please file
it separately.  I'd say this bug should just be closed, ideally with the
testcase going into the testsuite.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #9 from Marc Glisse marc.glisse at normalesup dot org 2010-11-10 
20:59:55 UTC ---
(In reply to comment #8)
 The #c6 testcase doesn't appear related to the original one, thus please file
 it separately.

Done as PR 46420.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-10 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #10 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-10 
21:17:19 UTC ---
This bug is fixed then.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-08 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-08 
10:35:27 UTC ---
And apparently went away in
http://gcc.gnu.org/viewcvs?root=gccview=revrev=166167
Guess we just want to add the testcase into the testsuite, unless the r166167
change would only make this issue latent.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-11-08 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

--- Comment #4 from Marc Glisse marc.glisse at normalesup dot org 2010-11-08 
11:01:03 UTC ---
(In reply to comment #3)
 And apparently went away in
 http://gcc.gnu.org/viewcvs?root=gccview=revrev=166167
 Guess we just want to add the testcase into the testsuite, unless the r166167
 change would only make this issue latent.

Our testsuite shows:
internal compiler error: in tsubst_copy, at cp/pt.c:11677

for some code with a compiler from 11/05. I am already trying to reduce another
bug, but if you think it is necessary I may look at producing another reduced
testcase later.


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-10-25 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1
 CC||jakub at gcc dot gnu.org


[Bug c++/46156] [4.6 Regression] ICE: in tsubst_copy, at cp/pt.c:11370 with -frounding-math

2010-10-24 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com
   Target Milestone|--- |4.6.0
Summary|ICE: in tsubst_copy, at |[4.6 Regression] ICE: in
   |cp/pt.c:11370 with  |tsubst_copy, at
   |-frounding-math |cp/pt.c:11370 with
   ||-frounding-math