Bug 51384 - seg fault in tsubst_copy_and_build
Summary: seg fault in tsubst_copy_and_build
Status: RESOLVED DUPLICATE of bug 51318
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 51318
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-01 20:59 UTC by David Binderman
Modified: 2011-12-06 14:19 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
gzipped C++ source code (250.31 KB, application/x-gzip)
2011-12-01 21:01 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2011-12-01 20:59:51 UTC
I just tried to compile the package eigen3-3.0.0
on latest trunk snapshot 20111126 on an AMD x86_64 box.

The compiler said

/home/dcb/rpmbuild/BUILD/eigen-eigen-65ee2328342f/Eigen/src/Core/DenseBase.h:247:137: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Here is valgrind helping out with a stack bracktrace

==13212== Invalid read of size 2
==13212==    at 0x55AC74: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:13374)
==13212==    by 0x559F36: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:13889)
==13212==    by 0x5591BA: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:13367)
==13212==    by 0x559DB3: tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) (pt.c:13519)
==13212==    by 0x54A350: tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) (pt.c:13245)
==13212==    by 0x56517D: tsubst_template_arg(tree_node*, tree_node*, int, tree_node*) (pt.c:9187)
==13212==    by 0x56DF3E: coerce_template_parms(tree_node*, tree_node*, tree_node*, int, bool, bool) (pt.c:6846)
==13212==    by 0x552A4E: lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) (pt.c:7375)
==13212==    by 0x658332: finish_template_type(tree_node*, tree_node*, int) (semantics.c:2760)
==13212==    by 0x5EFD18: cp_parser_template_id(cp_parser*, bool, bool, bool) (parser.c:12445)
==13212==    by 0x5F01AF: cp_parser_class_name(cp_parser*, bool, bool, tag_types, bool, bool, bool) (parser.c:17876)
==13212==    by 0x5EA699: cp_parser_nested_name_specifier_opt(cp_parser*, bool, bool, bool, bool) (parser.c:5249)
==13212==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==13212==

Preprocessed source code attached. Flag -march=native required.
Comment 1 David Binderman 2011-12-01 21:01:48 UTC
Created attachment 25969 [details]
gzipped C++ source code
Comment 2 Paolo Carlini 2011-12-01 21:55:09 UTC
Likely dup of PR51318
Comment 3 Richard Biener 2011-12-06 14:19:48 UTC
dup

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