Bug 94946 - [9/10/11 Regression] error: ‘template<class returnType> JSC::FunctionPtr::FunctionPtr(returnType (*)())’ cannot be overloaded since r10-7998-g5f1cd1da1a805c3d
Summary: [9/10/11 Regression] error: ‘template<class returnType> JSC::FunctionPtr::Fun...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: 9.4
Assignee: Nathan Sidwell
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2020-05-04 19:13 UTC by Martin Liška
Modified: 2020-05-07 13:46 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work: 9.3.0
Known to fail: 10.0, 11.0
Last reconfirmed: 2020-05-04 00:00:00


Attachments
Unreduced test-case (513.44 KB, application/x-bzip)
2020-05-04 19:13 UTC, Martin Liška
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2020-05-04 19:13:57 UTC
Created attachment 48445 [details]
Unreduced test-case

It's a recent regression on i586 target seen on libqt5-qtwebkit package:
$ g++ qt.ii -c -m32 -fmax-errors=1
^C
marxin@marxinbox:~/BIG/osc/openSUSE:Factory:Staging:N/libqt5-qtwebkit> export PATH=/home/marxin/bin/gcc/bin/:/home/marxin/bin/cvise/usr/local/bin:$PATH && export LD_LIBRARY_PATH=/home/marxin/bin/gcc/lib64/:$LD_LIBRARY_PATH
marxin@marxinbox:~/BIG/osc/openSUSE:Factory:Staging:N/libqt5-qtwebkit> g++ qt.ii -c -m32 -fmax-errors=1
In file included from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/jit/JITStubRoutine.h:32,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/JITStubRoutineSet.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/Heap.h:33,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/DeferGC.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/runtime/ConcurrentJITLock.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/bytecode/ArrayProfile.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
/home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:184:5: error: ‘template<class returnType> JSC::FunctionPtr::FunctionPtr(returnType (*)())’ cannot be overloaded with ‘template<class returnType> JSC::FunctionPtr::FunctionPtr(returnType (*)())’
In file included from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/jit/JITStubRoutine.h:32,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/JITStubRoutineSet.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/Heap.h:33,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/heap/DeferGC.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/runtime/ConcurrentJITLock.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/bytecode/ArrayProfile.h:29,
                 from /home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
/home/abuild/rpmbuild/BUILD/qtwebkit-5.212.0-alpha3/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h:94:5: note: previous declaration ‘template<class returnType> JSC::FunctionPtr::FunctionPtr(returnType (*)())’
compilation terminated due to -fmax-errors=1.

I'm reducing that right now.
Comment 1 Martin Liška 2020-05-05 04:10:19 UTC
Reduced test-case:

$ cat qt.ii
class a {
  template <typename b> a(b());
  template <typename b> a(b(__attribute__((fastcall)) c)());
};
Comment 2 Martin Liška 2020-05-06 08:54:33 UTC
Can please anybody take a look before we'll make 10.1 release?
Comment 3 Jakub Jelinek 2020-05-06 18:24:55 UTC
Isn't 9 branch affected too?  The r10-7998 change has been backported.
Comment 4 Marek Polacek 2020-05-06 18:27:22 UTC
(In reply to Jakub Jelinek from comment #3)
> Isn't 9 branch affected too?  The r10-7998 change has been backported.

It is.
Comment 5 Nathan Sidwell 2020-05-06 19:38:23 UTC
Patch pushed to 9, 10 & master
Comment 6 GCC Commits 2020-05-07 12:57:42 UTC
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:1d865b29abc99122e9faf109fe8faf2d6616a073

commit r11-164-g1d865b29abc99122e9faf109fe8faf2d6616a073
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu May 7 14:56:51 2020 +0200

    testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]
    
    The testcase in the current form doesn't FAIL without the patch on
    x86_64-linux unless also testing with -m32; as that the 64-bit testing
    on that target is probably way more common, and we can use also attributes
    that FAIL without the patch with -m64, the following patch adjusts the
    test, so that it FAILs without the patch for both -m64 and -m32 (but not
    -mx32) and PASSes with the patch.
    
    2020-05-07  Jakub Jelinek  <jakub@redhat.com>
    
            PR c++/94946
            * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
            sysv_abi and ms_abi attributes in that case instead of fastcall and
            no attribute.
Comment 7 GCC Commits 2020-05-07 13:28:26 UTC
The releases/gcc-10 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:dd38686d9c810cecbaa80bb82ed91caaa58ad635

commit r10-8117-gdd38686d9c810cecbaa80bb82ed91caaa58ad635
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu May 7 14:56:51 2020 +0200

    testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]
    
    The testcase in the current form doesn't FAIL without the patch on
    x86_64-linux unless also testing with -m32; as that the 64-bit testing
    on that target is probably way more common, and we can use also attributes
    that FAIL without the patch with -m64, the following patch adjusts the
    test, so that it FAILs without the patch for both -m64 and -m32 (but not
    -mx32) and PASSes with the patch.
    
    2020-05-07  Jakub Jelinek  <jakub@redhat.com>
    
            PR c++/94946
            * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
            sysv_abi and ms_abi attributes in that case instead of fastcall and
            no attribute.
Comment 8 GCC Commits 2020-05-07 13:46:32 UTC
The releases/gcc-9 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:fadd59262921825b135b8e018ac8510e97dee92a

commit r9-8577-gfadd59262921825b135b8e018ac8510e97dee92a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu May 7 14:56:51 2020 +0200

    testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]
    
    The testcase in the current form doesn't FAIL without the patch on
    x86_64-linux unless also testing with -m32; as that the 64-bit testing
    on that target is probably way more common, and we can use also attributes
    that FAIL without the patch with -m64, the following patch adjusts the
    test, so that it FAILs without the patch for both -m64 and -m32 (but not
    -mx32) and PASSes with the patch.
    
    2020-05-07  Jakub Jelinek  <jakub@redhat.com>
    
            PR c++/94946
            * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use
            sysv_abi and ms_abi attributes in that case instead of fastcall and
            no attribute.