public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
@ 2009-09-29 14:02 jamborm at gcc dot gnu dot org
2009-09-29 16:43 ` [Bug c++/41503] " jamborm at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-09-29 14:02 UTC (permalink / raw)
To: gcc-bugs
function_parameter_expanded_from_pack_p() segfaults when compiling
20_util/reference_wrapper/24803.cc and IPA-SRA turned on. The reason
is that it is presented a PARM_DECL that was created by IPA-SRA and
which does not have language specific data.
The backtrace is:
#0 0x00000000004b872f in function_parameter_expanded_from_pack_p
(param_decl=0x7ffff6a123f0, pack=0x7ffff6e59cf0)
at /home/jamborm/gcc/mine/gcc/cp/pt.c:2679
#1 0x0000000000604090 in gen_subprogram_die (decl=0x7ffff6b2ca00,
context_die=<value optimized out>)
at /home/jamborm/gcc/mine/gcc/dwarf2out.c:15459
#2 0x0000000000605c01 in gen_decl_die (decl=0x7ffff6b2ca00, origin=0x0,
context_die=0x7ffff734a2a0)
at /home/jamborm/gcc/mine/gcc/dwarf2out.c:17538
#3 0x0000000000605268 in dwarf2out_abstract_function (decl=0x7ffff6b2ca00)
at /home/jamborm/gcc/mine/gcc/dwarf2out.c:15624
#4 0x000000000090b11b in optimize_inline_calls (fn=0x7ffff6c3e900)
at /home/jamborm/gcc/mine/gcc/tree-inline.c:3820
#5 0x00000000008e90af in cgraph_early_inlining () at
/home/jamborm/gcc/mine/gcc/ipa-inline.c:1593
#6 0x00000000006ecd04 in execute_one_pass (pass=0x10fe430) at
/home/jamborm/gcc/mine/gcc/passes.c:1295
#7 0x00000000006ecf45 in execute_pass_list (pass=0x10fe430) at
/home/jamborm/gcc/mine/gcc/passes.c:1344
#8 0x00000000006ecf57 in execute_pass_list (pass=0x10444a0) at
/home/jamborm/gcc/mine/gcc/passes.c:1345
#9 0x00000000006ed29e in execute_ipa_pass_list (pass=0x1044440) at
/home/jamborm/gcc/mine/gcc/passes.c:906
#10 0x00000000008e3c6c in cgraph_finalize_compilation_unit () at
/home/jamborm/gcc/mine/gcc/cgraphunit.c:1358
#11 0x00000000004e68c6 in cp_write_global_declarations () at
/home/jamborm/gcc/mine/gcc/cp/decl2.c:3754
#12 0x000000000077f0c0 in toplev_main (argc=39, argv=0x7fffffffd978) at
/home/jamborm/gcc/mine/gcc/toplev.c:1050
#13 0x00007ffff73f3586 in __libc_start_main () from /lib64/libc.so.6
#14 0x0000000000493bc9 in _start () at ../sysdeps/x86_64/elf/start.S:113
I am about to test a patch that will make the function return false
if DECL_ARTIFICIAL (param_decl) is true.
--
Summary: function_parameter_expanded_from_pack_p segfaults when
passed a PARM_DECL created by IPA-SRA
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: jamborm at gcc dot gnu dot org
ReportedBy: jamborm at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
@ 2009-09-29 16:43 ` jamborm at gcc dot gnu dot org
2009-09-29 16:52 ` jamborm at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-09-29 16:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jamborm at gcc dot gnu dot org 2009-09-29 16:42 -------
The following patch fixes the problem, I will send it to the mailing
list soon:
2009-09-29 Martin Jambor <mjambor@suse.cz>
PR c++/41503
* cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
DECL_ARTIFICIAL (param_decl) is true.
Index: mine/gcc/cp/pt.c
===================================================================
--- mine.orig/gcc/cp/pt.c
+++ mine/gcc/cp/pt.c
@@ -2669,7 +2669,8 @@ get_function_template_decl (const_tree p
bool
function_parameter_expanded_from_pack_p (tree param_decl, tree pack)
{
- if (! function_parameter_pack_p (pack))
+ if (DECL_ARTIFICIAL (param_decl)
+ || !function_parameter_pack_p (pack))
return false;
gcc_assert (DECL_NAME (param_decl) && DECL_NAME (pack));
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
2009-09-29 16:43 ` [Bug c++/41503] " jamborm at gcc dot gnu dot org
@ 2009-09-29 16:52 ` jamborm at gcc dot gnu dot org
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-09-29 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jamborm at gcc dot gnu dot org 2009-09-29 16:52 -------
(In reply to comment #1)
> The following patch fixes the problem, I will send it to the mailing
> list soon:
>
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg02105.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
@ 2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
2009-10-01 9:31 ` jamborm at gcc dot gnu dot org
2009-10-02 11:39 ` jamborm at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-09-30 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2009-09-30 22:16 -------
*** Bug 41527 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
2009-09-29 16:43 ` [Bug c++/41503] " jamborm at gcc dot gnu dot org
2009-09-29 16:52 ` jamborm at gcc dot gnu dot org
@ 2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-09-30 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2009-09-30 22:17 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-09-30 22:17:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
@ 2009-10-01 9:31 ` jamborm at gcc dot gnu dot org
2009-10-02 11:39 ` jamborm at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-10-01 9:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jamborm at gcc dot gnu dot org 2009-10-01 09:31 -------
Subject: Bug 41503
Author: jamborm
Date: Thu Oct 1 09:31:08 2009
New Revision: 152365
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152365
Log:
2009-10-01 Martin Jambor <mjambor@suse.cz>
PR c++/41503
* cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
DECL_ARTIFICIAL (param_decl) is true.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/pt.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/41503] function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-10-01 9:31 ` jamborm at gcc dot gnu dot org
@ 2009-10-02 11:39 ` jamborm at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2009-10-02 11:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jamborm at gcc dot gnu dot org 2009-10-02 11:39 -------
Fixed
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41503
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-02 11:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-29 14:02 [Bug c++/41503] New: function_parameter_expanded_from_pack_p segfaults when passed a PARM_DECL created by IPA-SRA jamborm at gcc dot gnu dot org
2009-09-29 16:43 ` [Bug c++/41503] " jamborm at gcc dot gnu dot org
2009-09-29 16:52 ` jamborm at gcc dot gnu dot org
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
2009-09-30 22:17 ` pinskia at gcc dot gnu dot org
2009-10-01 9:31 ` jamborm at gcc dot gnu dot org
2009-10-02 11:39 ` jamborm at gcc dot gnu dot org
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).