public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778)
@ 2008-07-02 20:25 burnus at gcc dot gnu dot org
2008-07-02 20:27 ` [Bug fortran/36703] " burnus at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-02 20:25 UTC (permalink / raw)
To: gcc-bugs
http://groups.google.com/group/comp.lang.fortran/msg/b600c081a3654936
compiling attached program causes a segfault.
$ gfortran -c -fcray-pointer aaa.f90
aaa.f90: In function 'fptr':
aaa.f90:89: internal compiler error: Segmentation fault
==4019== Invalid read of size 4
==4019== at 0x40327E: reduce_binary0 (arith.c:1778)
==4019== by 0x40407E: eval_intrinsic_f3 (arith.c:1841)
==4019== by 0x4AA386: gfc_apply_interface_mapping_to_expr
(trans-expr.c:1815)
==4019== by 0x4B157E: gfc_apply_interface_mapping (trans-expr.c:1991)
==4019== by 0x4AB839: gfc_conv_function_call (trans-expr.c:2669)
==4019== by 0x4AC6CB: gfc_conv_function_expr (trans-expr.c:3201)
==4019== by 0x496DB7: gfc_add_loop_ss_code (trans-array.c:1977)
==4019== by 0x497980: gfc_conv_loop_setup (trans-array.c:3496)
==4019== by 0x4BBB6E: gfc_trans_transfer (trans-io.c:2216)
==4019== by 0x48C5C7: gfc_trans_code (trans.c:1118)
==4019== by 0x4BEC48: build_dt (trans-io.c:1805)
==4019== by 0x48C5F7: gfc_trans_code (trans.c:1090)
--
Summary: ICE (segfault) in reduce_binary0 (arith.c:1778)
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
@ 2008-07-02 20:27 ` burnus at gcc dot gnu dot org
2009-02-12 9:19 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-02 20:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2008-07-02 20:26 -------
Created an attachment (id=15844)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15844&action=view)
Test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
2008-07-02 20:27 ` [Bug fortran/36703] " burnus at gcc dot gnu dot org
@ 2009-02-12 9:19 ` pault at gcc dot gnu dot org
2009-02-13 12:53 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-02-12 9:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2009-02-12 09:19 -------
(In reply to comment #1)
Interestingly, if the WRITE statement is cut, the compilation now fails with:
pr36703.f90: In function 'gp':
pr36703.f90:46: internal compiler error: in expand_expr_real_1, at expr.c:7282
This corresponds to the line:
__result_gp = get_funloc (make_mess, aux, ..__result);
and the declaration of get_funloc is:
get_funloc (void (*<T193>) (character(kind=1)[0:][1:.x] * &, integer(kind=4),
st
ruct array01_integer(kind=4) &) x, void (*<T5b>) (void) (*<T181>) (void) y,
inte
ger(kind=4) _x)
{
void (*<T5b>) (void) __result_get_funloc;
__result_get_funloc = y (x);
return __result_get_funloc;
}
which looks OK. The ICE is generated by -
context = decl_function_context (exp);
gcc_assert (!context
|| context = current_function_decl
|| TREE_STATIC (exp)
/* ??? C++ creates functions that are not TREE_STATIC. */
|| TREE_CODE (exp) == FUNC_DECL);
I have not checked yet but I would guess that it is the latter that is the
problem.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-02-12 09:19:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
2008-07-02 20:27 ` [Bug fortran/36703] " burnus at gcc dot gnu dot org
2009-02-12 9:19 ` pault at gcc dot gnu dot org
@ 2009-02-13 12:53 ` pault at gcc dot gnu dot org
2009-02-13 21:13 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-02-13 12:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2009-02-13 12:53 -------
The patch for 36703 also fixes this fellow.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-02-12 09:19:21 |2009-02-13 12:53:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-02-13 12:53 ` pault at gcc dot gnu dot org
@ 2009-02-13 21:13 ` pault at gcc dot gnu dot org
2009-03-28 17:09 ` pault at gcc dot gnu dot org
2009-04-06 11:08 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-02-13 21:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2009-02-13 21:12 -------
Subject: Bug 36703
Author: pault
Date: Fri Feb 13 21:12:34 2009
New Revision: 144164
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144164
Log:
2009-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36703
PR fortran/36528
* trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
function references to ensure that a valid expression is used.
(gfc_conv_function_call): Pass Cray pointers to procedures.
2009-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36528
* gfortran.dg/cray_pointers_8.f90: New test.
PR fortran/36703
* gfortran.dg/cray_pointers_9.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/cray_pointers_8.f90
trunk/gcc/testsuite/gfortran.dg/cray_pointers_9.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-02-13 21:13 ` pault at gcc dot gnu dot org
@ 2009-03-28 17:09 ` pault at gcc dot gnu dot org
2009-04-06 11:08 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-03-28 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2009-03-28 17:08 -------
Subject: Bug 36703
Author: pault
Date: Sat Mar 28 17:08:25 2009
New Revision: 145196
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145196
Log:
2009-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36703
PR fortran/36528
* trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
function references to ensure that a valid expression is used.
(gfc_conv_function_call): Pass Cray pointers to procedures.
2009-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/36528
* gfortran.dg/cray_pointers_8.f90: New test.
PR fortran/36703
* gfortran.dg/cray_pointers_9.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/char_result_13.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/36703] ICE (segfault) in reduce_binary0 (arith.c:1778)
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-03-28 17:09 ` pault at gcc dot gnu dot org
@ 2009-04-06 11:08 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-06 11:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2009-04-06 11:07 -------
Fixed on trunk and 4.4
Thanks for the report
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36703
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-06 11:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-02 20:25 [Bug fortran/36703] New: ICE (segfault) in reduce_binary0 (arith.c:1778) burnus at gcc dot gnu dot org
2008-07-02 20:27 ` [Bug fortran/36703] " burnus at gcc dot gnu dot org
2009-02-12 9:19 ` pault at gcc dot gnu dot org
2009-02-13 12:53 ` pault at gcc dot gnu dot org
2009-02-13 21:13 ` pault at gcc dot gnu dot org
2009-03-28 17:09 ` pault at gcc dot gnu dot org
2009-04-06 11:08 ` pault 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).