public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space
@ 2010-04-09 15:13 zsojka at seznam dot cz
2010-04-09 18:38 ` [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-04-09 15:13 UTC (permalink / raw)
To: gcc-bugs
Valgrind output:
$ valgrind -q --trace-children=yes g++ testcase.C
testcase.C:3:14: error: explicit specialization in non-namespace scope 'struct
S< <template-parameter-1-1> >'
testcase.C:3:23: error: specialization of 'template<class> struct S' must
appear at namespace scope
testcase.C:3:23: error: template parameters not used in partial specialization:
testcase.C:3:23: error: '<template-parameter-1-1>'
==28340== Invalid read of size 2
==28340== at 0x4AF07A: build_new_method_call (call.c:6221)
==28340== by 0x4B0A70: build_special_member_call (call.c:6126)
==28340== by 0x5AA481: expand_aggr_init_1 (init.c:1355)
==28340== by 0x5AF0B8: build_aggr_init (init.c:1275)
==28340== by 0x4B6673: build_aggr_init_full_exprs (decl.c:5138)
==28340== by 0x4D3CD1: cp_finish_decl (decl.c:5264)
==28340== by 0x57C63D: cp_parser_init_declarator (parser.c:13743)
==28340== by 0x57CFCA: cp_parser_simple_declaration (parser.c:8943)
==28340== by 0x57D3D6: cp_parser_block_declaration (parser.c:8841)
==28340== by 0x583EA9: cp_parser_declaration (parser.c:8746)
==28340== by 0x583919: cp_parser_declaration_seq_opt (parser.c:8637)
==28340== by 0x584C24: c_parse_file (parser.c:3091)
==28340== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28340==
testcase.C:9:14: 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.
------ testcase.C ------
template < typename > struct S
{
template < > struct S < int >
{
S(int);
};
};
S < int > s(0);
------------------------
Tested revisions:
r158150, 4.5 r158131, 4.4 r158133 - crash
4.4.3, 4.3.4, 4.1.2, 3.4.6, 3.3.6 - crash
4.2.4 - OK (without asserts)
Only 4.2.4 works:
$ g++-4.2.4 testcase.C
testcase.C:3: error: explicit specialization in non-namespace scope 'struct S<
<template-parameter-1-1> >'
testcase.C:9: error: no matching function for call to 'S<int>::S(int)'
testcase.C:2: note: candidates are: S<int>::S()
testcase.C:2: note: S<int>::S(const S<int>&)
--
Summary: ICE: SIGSEGV with template specialization in non-
namespace space
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43705
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope
2010-04-09 15:13 [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space zsojka at seznam dot cz
@ 2010-04-09 18:38 ` pinskia at gcc dot gnu dot org
2010-05-04 10:57 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-04-09 18:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2010-04-09 18:38 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |error-recovery
Last reconfirmed|0000-00-00 00:00:00 |2010-04-09 18:38:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43705
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope
2010-04-09 15:13 [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space zsojka at seznam dot cz
2010-04-09 18:38 ` [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope pinskia at gcc dot gnu dot org
@ 2010-05-04 10:57 ` paolo dot carlini at oracle dot com
2010-05-04 14:18 ` paolo at gcc dot gnu dot org
2010-05-04 14:19 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-04 10:57 UTC (permalink / raw)
To: gcc-bugs
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43705
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope
2010-04-09 15:13 [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space zsojka at seznam dot cz
2010-04-09 18:38 ` [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope pinskia at gcc dot gnu dot org
2010-05-04 10:57 ` paolo dot carlini at oracle dot com
@ 2010-05-04 14:18 ` paolo at gcc dot gnu dot org
2010-05-04 14:19 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-05-04 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo at gcc dot gnu dot org 2010-05-04 14:18 -------
Subject: Bug 43705
Author: paolo
Date: Tue May 4 14:17:52 2010
New Revision: 159029
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159029
Log:
/cp
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43705
* call.c (build_new_method_call): Return error_mark_node if fns is
NULL_TREE.
/testsuite
2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43705
* g++.dg/template/crash95.C: New.
Added:
trunk/gcc/testsuite/g++.dg/template/crash95.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43705
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope
2010-04-09 15:13 [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-05-04 14:18 ` paolo at gcc dot gnu dot org
@ 2010-05-04 14:19 ` paolo dot carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-04 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2010-05-04 14:19 -------
Fixed.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43705
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-04 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09 15:13 [Bug c++/43705] New: ICE: SIGSEGV with template specialization in non-namespace space zsojka at seznam dot cz
2010-04-09 18:38 ` [Bug c++/43705] ICE: SIGSEGV with template specialization in non-namespace scope pinskia at gcc dot gnu dot org
2010-05-04 10:57 ` paolo dot carlini at oracle dot com
2010-05-04 14:18 ` paolo at gcc dot gnu dot org
2010-05-04 14:19 ` paolo dot carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).