[Bug c++/70776] [4.9/5/6/7 Regression] ICE on invalid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 25 07:56:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70776
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-04-25
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. Infinite recursion via
#0 0x0000000000b0051e in ggc_internal_alloc (
size=<error reading variable: Cannot access memory at address
0x7ffffbffeed8>, f=<error reading variable: Cannot access memory at address
0x7ffffbffeed0>,
s=<error reading variable: Cannot access memory at address 0x7ffffbffeec8>,
n=<error reading variable: Cannot access memory at address 0x7ffffbffeec0>)
at /space/rguenther/src/svn/trunk/gcc/ggc-page.c:1267
#1 0x0000000000d3e569 in ggc_internal_cleared_alloc (size=40, f=0x0, s=0, n=1)
at /space/rguenther/src/svn/trunk/gcc/ggc-common.c:116
#2 0x00000000013e9456 in ggc_internal_cleared_alloc (s=40)
at /space/rguenther/src/svn/trunk/gcc/ggc.h:148
#3 0x00000000013e948a in ggc_alloc_cleared_tree_node_stat (s=40)
at /space/rguenther/src/svn/trunk/gcc/ggc.h:292
#4 0x00000000013ef8c2 in make_tree_vec_stat (len=2)
at /space/rguenther/src/svn/trunk/gcc/tree.c:2281
#5 0x000000000081467f in coerce_template_parms (
parms=<tree_vec 0x7ffff69da758>, args=<tree_vec 0x7ffff67ee438>,
in_decl=<template_decl 0x7ffff69f1100 B>, complain=0,
require_all_args=true, use_default_args=true)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:7594
#6 0x00000000008151a1 in coerce_innermost_template_parms (
parms=<tree_list 0x7ffff69da780>, args=<tree_vec 0x7ffff67ee438>,
in_decl=<template_decl 0x7ffff69f1100 B>, complain=0,
require_all_args=true, use_default_args=true)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:7820
#7 0x0000000000817ceb in lookup_template_class_1 (
d1=<identifier_node 0x7ffff69efd68 B>, arglist=<tree_vec 0x7ffff67ee438>,
in_decl=<tree 0x0>, context=<translation_unit_decl 0x7ffff6893168>,
entering_scope=0, complain=0)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:8297
#8 0x000000000081ae6b in lookup_template_class (
d1=<record_type 0x7ffff69df7e0 B>, arglist=<tree_vec 0x7ffff67ee438>,
in_decl=<tree 0x0>, context=<translation_unit_decl 0x7ffff6893168>,
entering_scope=0, complain=0)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:8638
#9 0x00000000008274a3 in tsubst_aggr_type (t=<record_type 0x7ffff69df7e0 B>,
args=<tree_vec 0x7ffff67ef040>, complain=0, in_decl=<tree 0x0>,
entering_scope=0) at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:11425
#10 0x000000000082fe5d in tsubst (t=<record_type 0x7ffff69df7e0 B>,
args=<tree_vec 0x7ffff67ef040>, complain=0, in_decl=<tree 0x0>)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:12895
#11 0x0000000000833e7d in tsubst_qualified_id (
qualified_id=<scope_ref 0x7ffff69daac8>, args=<tree_vec 0x7ffff67ef040>,
complain=0, in_decl=<tree 0x0>, done=true, address_p=false)
at /space/rguenther/src/svn/trunk/gcc/cp/pt.c:13734
...
Clang detects:
> clang++ -S t.ii
t.ii:6:34: fatal error: recursive template instantiation exceeded maximum depth
of 256
Not sure if the testcase is thus invalid (but we should diagnose it instead
of crashing).
More information about the Gcc-bugs
mailing list