Launchpad has imported 5 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80856.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2017-05-22T13:40:31+00:00 Josh Kelley wrote:

Created attachment 41402
Test case

Compiling the attached source file with no flags ("g++-7
EngineReportWriter.cpp") results in an internal compiler error:

EngineReportWriter.cpp: In function ‘T WrapToCycle(T) [with T = int]’:
EngineReportWriter.cpp:2:10: internal compiler error: Segmentation fault
 inline T WrapToCycle(T degrees)
          ^~~~~~~~~~~
0x86f4b4a crash_signal
        ../../src/gcc/toplev.c:337
0x84d576b useless_type_conversion_p(tree_node*, tree_node*)
        ../../src/gcc/gimple-expr.c:85
0x83b4b8f types_compatible_p
        ../../src/gcc/gimple-expr.h:66
0x83b4b8f gimple_check_call_args
        ../../src/gcc/cgraph.c:3733
0x83b4b8f gimple_check_call_matching_types(gimple*, tree_node*, bool)
        ../../src/gcc/cgraph.c:3783
0x83b6304 symbol_table::create_edge(cgraph_node*, cgraph_node*, gcall*, long 
long, int, bool)
        ../../src/gcc/cgraph.c:864
0x83b6529 cgraph_node::create_edge(cgraph_node*, gcall*, long long, int)
        ../../src/gcc/cgraph.c:900
0x83bbb06 execute
        ../../src/gcc/cgraphbuild.c:337
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.


The bug appears to be triggered by the combination of a template plus local 
function declarations plus overload resolution.  If I move the local scope 
function declarations to global scope, or if I change the function declarations 
so that overload resolution isn't necessary, then the bug goes away.

This is on Ubuntu 14.04 x86, running GCC 7.1.0 from the Ubuntu Toolchain
Test PPA (https://launchpad.net/~ubuntu-
toolchain-r/+archive/ubuntu/test).

Previous versions of GCC (including GCC 6.3.0 from the Ubuntu Toolchain
Test PPA) are unaffected.

GCC 7.1 on godbolt.org is also reporting errors:
https://godbolt.org/g/eAYhqd

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1692525/comments/0

------------------------------------------------------------------------
On 2017-05-22T14:45:46+00:00 Trippels wrote:

Started with r236221:

commit eee80116a8d0e277930da56aaf57a3d7e880bc86
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri May 13 19:18:35 2016 +0000

            Fix type-dependence and the current instantiation.
    
            PR c++/10200
            PR c++/69753

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1692525/comments/3

------------------------------------------------------------------------
On 2017-05-30T21:13:59+00:00 Jason-gcc wrote:

Author: jason
Date: Tue May 30 21:13:27 2017
New Revision: 248699

URL: https://gcc.gnu.org/viewcvs?rev=248699&root=gcc&view=rev
Log:
        PR c++/80856 - ICE with local extern in template

        * semantics.c (finish_call_expr): Replace a local extern overload
        set in a template with the IDENTIFIER_NODE.

Added:
    trunk/gcc/testsuite/g++.dg/template/local-fn2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1692525/comments/4

------------------------------------------------------------------------
On 2017-05-31T17:53:44+00:00 Jason-gcc wrote:

Author: jason
Date: Wed May 31 17:53:12 2017
New Revision: 248754

URL: https://gcc.gnu.org/viewcvs?rev=248754&root=gcc&view=rev
Log:
        PR c++/80856 - ICE with local extern in template

        * semantics.c (finish_call_expr): Replace a local extern overload
        set in a template with the IDENTIFIER_NODE.

Added:
    branches/gcc-7-branch/gcc/testsuite/g++.dg/template/local-fn2.C
Modified:
    branches/gcc-7-branch/gcc/cp/ChangeLog
    branches/gcc-7-branch/gcc/cp/semantics.c

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1692525/comments/5

------------------------------------------------------------------------
On 2017-05-31T18:49:35+00:00 Jason-gcc wrote:

Fixed.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-7/+bug/1692525/comments/6

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1692525

Title:
  ICE from template local overload resolution

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1692525/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to