Bug 53177 - [4.8 Regression] 20_util/function/cons/callable.cc failed with -m32 -march=corei7
Summary: [4.8 Regression] 20_util/function/cons/callable.cc failed with -m32 -march=co...
Status: RESOLVED DUPLICATE of bug 53209
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-01 19:51 UTC by H.J. Lu
Modified: 2012-05-04 02:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-05-01 00:00:00


Attachments
testcase (80.97 KB, application/x-bzip2)
2012-05-01 21:06 UTC, Jonathan Wakely
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-05-01 19:51:54 UTC
On Linux/ia32, I got

/export/gnu/import/git/gcc-regression/master/186948/bld/./gcc/g++ -shared-libgcc -B/export/gnu/import/git/gcc-regression/master/186948/bld/./gcc -nostdinc++ -L/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/gnu/import/git/gcc-regression/master/186948/usr/x86_64-unknown-linux-gnu/bin/ -B/export/gnu/import/git/gcc-regression/master/186948/usr/x86_64-unknown-linux-gnu/lib/ -isystem /export/gnu/import/git/gcc-regression/master/186948/usr/x86_64-unknown-linux-gnu/include -isystem /export/gnu/import/git/gcc-regression/master/186948/usr/x86_64-unknown-linux-gnu/sys-include -m32 -B/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE  -DLOCALEDIR="." -nostdinc++ -I/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/gnu/import/git/gcc-regression/gcc/libstdc++-v3/libsupc++ -I/export/gnu/import/git/gcc-regression/gcc/libstdc++-v3/include/backward -I/export/gnu/import/git/gcc-regression/gcc/libstdc++-v3/testsuite/util /export/gnu/import/git/gcc-regression/gcc/libstdc++-v3/testsuite/20_util/function/cons/callable.cc   -std=gnu++0x -S  -m32 -march=corei7 -o callable.s 
In file included from /export/gnu/import/git/gcc-regression/gcc/libstdc++-v3/testsuite/20_util/function/cons/callable.cc:21:0:
/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/functional: In function ‘void test01()’:
/export/gnu/import/git/gcc-regression/master/186948/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/functional:2057:63: internal compiler error: tree check: expected tree_vec, have error_mark in comp_template_args_with_info, at cp/pt.c:7038
  using _Requires = typename enable_if<_Cond::value, _Tp>::type;
                                                               ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Jonathan Wakely 2012-05-01 20:59:00 UTC
mine
Comment 2 Jonathan Wakely 2012-05-01 21:06:37 UTC
Created attachment 27277 [details]
testcase

I was seeing an ICE in the same place with an earlier version of the changes which caused this testcase regression.  I have only managed to reduce it to 10k lines so far - that delta-reduced file is attached, I haven't had time to try manually reducing it.

Presumably fixing the ICE for this file will also fix it for this the testcase regression.
Comment 3 Jonathan Wakely 2012-05-01 21:08:16 UTC
Unassigning myself.  I don't think there's any more I can do beyond providing the testcase.  Let me know if my patch needs to be reverted.
Comment 4 Marc Glisse 2012-05-02 00:54:38 UTC
(In reply to comment #2)
> I was seeing an ICE in the same place with an earlier version of the changes
> which caused this testcase regression.  I have only managed to reduce it to 10k
> lines so far - that delta-reduced file is attached, I haven't had time to try
> manually reducing it.

If you only want a small example causing the ICE, here is one (-std=c++0x is enough, no need for -m32 or -march). If you want something that looks vaguely like a valid C++ program, it's going to be bigger...

extern "C++" namespace __attribute__ ) template < } template < typename > struct add_rvalue_reference ; template < _Tp > typename declval ( ) noexcept ; struct { typedef long __type } struct { } template < typename _Res , typename ... _ArgTypes > class function < _Res ( _ArgTypes ) { _Signature_type ( _ArgTypes ) template < typename _Functor > using _Invoke decltype ( ( declval < _Functor > ) ) template < typename , typename > struct _CheckResult { } template < ; template < typename _Functor > using _Callable _CheckResult < _Invoke < _Functor > , _Res > template < typename , typename > using _Requires template < typename _Functor , typename = _Requires < _Callable < _Functor > , void > > function ( _Functor ; } ; f ( function < void > ) { f ( [ ] )
Comment 5 Jonathan Wakely 2012-05-02 08:29:18 UTC
Thanks, Marc!
Comment 6 H.J. Lu 2012-05-04 02:42:22 UTC
Dup.

*** This bug has been marked as a duplicate of bug 53209 ***