public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25619] New: ICE in gimplify_expr with chacter type
@ 2006-01-01 6:36 pinskia at gcc dot gnu dot org
2006-01-02 3:08 ` [Bug fortran/25619] tempary array of character type goes wrong pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01 6:36 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
Testcase:
subroutine option_stopwatch_s(default_clock)
character, intent(in) :: default_clock
call option_stopwatch_a((/default_clock/))
end subroutine option_stopwatch_s
------
pc64:~> ~/checkin/bin/gfortran t.f90 -fdump-tree-all
t.f90: In function option_stopwatch_s:
t.f90:3: internal compiler error: in gimplify_expr, at gimplify.c:4658
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
------
In 4.0.3, we ICE differently with:
t.f90:1: internal compiler error: in gfc_build_indirect_ref, at
fortran/trans.c:291
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Related to 23634 as it was reduced from that PR (though only to find this bug)
--
Summary: ICE in gimplify_expr with chacter type
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
BugsThisDependsOn: 23634
OtherBugsDependingO 19276
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
@ 2006-01-02 3:08 ` pinskia at gcc dot gnu dot org
2006-01-02 3:13 ` [Bug fortran/25619] tempary array of constant size " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-02 3:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-02 03:08 -------
If we make a tempary variable to hold the array, it works:
subroutine option_stopwatch_s(default_clock)
character(len=2), intent(in) :: default_clock
character(len=2), dimension(1) :: a
a = (/default_clock/)
call option_stopwatch_a(a)
end subroutine option_stopwatch_s
--------------------------------
The problem is obvious in .t02.orginal:
(*(char[0:][1:1] *) atmp.3.data)[NON_LVALUE_EXPR <S.5>] =
*(*(char[0:][1:1] *) atmp.0.data)[NON_LVALUE_EXPR <S.5>];
That is an array copy which is just wrong as there is no such thing in Generic
or the gimplifier can handle.
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 |2006-01-02 03:08:33
date| |
Summary|ICE in gimplify_expr with |tempary array of character
|chacter type |type goes wrong
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
2006-01-02 3:08 ` [Bug fortran/25619] tempary array of character type goes wrong pinskia at gcc dot gnu dot org
@ 2006-01-02 3:13 ` pinskia at gcc dot gnu dot org
2006-02-21 9:08 ` fxcoudert at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-02 3:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-02 03:13 -------
the variable does not have to be a "dummy" variable either to reproduce this.
subroutine option_stopwatch_s()
character(len=1) :: default_clock
call option_stopwatch_a((/default_clock/))
end subroutine option_stopwatch_s
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|tempary array of character |tempary array of constant
|type goes wrong |size character type goes
| |wrong
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
2006-01-02 3:08 ` [Bug fortran/25619] tempary array of character type goes wrong pinskia at gcc dot gnu dot org
2006-01-02 3:13 ` [Bug fortran/25619] tempary array of constant size " pinskia at gcc dot gnu dot org
@ 2006-02-21 9:08 ` fxcoudert at gcc dot gnu dot org
2006-02-28 0:25 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-02-21 9:08 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4613 bytes --]
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2006-02-21 09:08 -------
(In reply to comment #2)
> the variable does not have to be a "dummy" variable either to reproduce this.
> subroutine option_stopwatch_s()
> character(len=1) :: default_clock
> call option_stopwatch_a((/default_clock/))
> end subroutine option_stopwatch_s
>
Another example of the (probably) same bug (reported by Vivek Rao, reduced by
myself):
$ cat vivek.f90
character(len=1) :: s(1) = ""
integer :: i(1)
print *, s(i)
end
$ gfortran -c vivek.f90
vivek.f90: In function MAIN__:
vivek.f90:3: internal compiler error: in gimplify_expr, at gimplify.c:5788
The top of the gdb backtrace is:
Breakpoint 1, fancy_abort (file=0x859ff15 "../../../trunk/gcc/gimplify.c",
line=5788, function=0x85a052e "gimplify_expr")
at ../../../trunk/gcc/diagnostic.c:641
641 {
(gdb) where
#0 fancy_abort (file=0x859ff15 "../../../trunk/gcc/gimplify.c", line=5788,
function=0x85a052e "gimplify_expr") at ../../../trunk/gcc/diagnostic.c:641
#1 0x080e49d0 in gimplify_expr (expr_p=0xb7bcc09c, pre_p=0xbfafd324,
post_p=Variable "post_p" is not available.
)
at ../../../trunk/gcc/gimplify.c:5788
#2 0x080e2b5b in gimplify_expr (expr_p=0xb7b6e434, pre_p=0xbfafd324,
post_p=0xbfafd320, gimple_test_f=0x80dae80 <is_gimple_mem_rhs>,
fallback=fb_rvalue) at ../../../trunk/gcc/gimplify.c:5341
#3 0x080e1a1a in gimplify_modify_expr (expr_p=0xb7bba554, pre_p=0xbfafd324,
post_p=0xbfafd320, want_value=0 '\0') at ../../../trunk/gcc/gimplify.c:3433
#4 0x080e3b1a in gimplify_expr (expr_p=0xb7bba554, pre_p=0xbfafd324,
post_p=Variable "post_p" is not available.
)
at ../../../trunk/gcc/gimplify.c:5270
#5 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bba554)
at ../../../trunk/gcc/gimplify.c:4129
#6 0x080e27f7 in gimplify_expr (expr_p=0xb7bb0570, pre_p=0xbfafd3c4,
post_p=0xbfafd3c0, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:3591
#7 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bb0570)
at ../../../trunk/gcc/gimplify.c:4129
#8 0x080e6c17 in gimplify_to_stmt_list (stmt_p=0xb7bb0570)
at ../../../trunk/gcc/gimplify.c:4137
#9 0x080e7753 in gimplify_bind_expr (expr_p=0xb7bba56c, temp=0x0,
pre_p=0xbfafd4c4) at ../../../trunk/gcc/gimplify.c:1036
#10 0x080e30e5 in gimplify_expr (expr_p=0xb7bba56c, pre_p=0xbfafd4c4,
post_p=0xbfafd4c0, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:5376
#11 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bba56c)
at ../../../trunk/gcc/gimplify.c:4129
#12 0x080e27f7 in gimplify_expr (expr_p=0xbfafd5b0, pre_p=0xbfafd564,
post_p=0xbfafd560, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:3591
#13 0x080e5dcf in gimplify_stmt (stmt_p=0xbfafd5b0)
at ../../../trunk/gcc/gimplify.c:4129
#14 0x080e7c6f in gimplify_and_add (t=0xb7bc88e8, list_p=0xbfafd614)
at ../../../trunk/gcc/gimplify.c:336
#15 0x080e2c8c in gimplify_expr (expr_p=0xb7bba590, pre_p=0xbfafd614,
post_p=0xbfafd610, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:1241
#16 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bba590)
at ../../../trunk/gcc/gimplify.c:4129
#17 0x080e27f7 in gimplify_expr (expr_p=0xb7bb05c0, pre_p=0xbfafd6b4,
post_p=0xbfafd6b0, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:3591
#18 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bb05c0)
at ../../../trunk/gcc/gimplify.c:4129
#19 0x080e6c17 in gimplify_to_stmt_list (stmt_p=0xb7bb05c0)
at ../../../trunk/gcc/gimplify.c:4137
#20 0x080e7753 in gimplify_bind_expr (expr_p=0xb7bba5a8, temp=0x0,
pre_p=0xbfafd7b4) at ../../../trunk/gcc/gimplify.c:1036
#21 0x080e30e5 in gimplify_expr (expr_p=0xb7bba5a8, pre_p=0xbfafd7b4,
post_p=0xbfafd7b0, gimple_test_f=0x80daf90 <is_gimple_stmt>,
fallback=fb_none) at ../../../trunk/gcc/gimplify.c:5376
#22 0x080e5dcf in gimplify_stmt (stmt_p=0xb7bba5a8)
at ../../../trunk/gcc/gimplify.c:4129
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Last reconfirmed|2006-01-27 20:42:14 |2006-02-21 09:08:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-02-21 9:08 ` fxcoudert at gcc dot gnu dot org
@ 2006-02-28 0:25 ` pinskia at gcc dot gnu dot org
2006-02-28 13:12 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-28 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-02-28 00:23 -------
*** Bug 26491 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |michael dot paton at amd dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-02-28 0:25 ` pinskia at gcc dot gnu dot org
@ 2006-02-28 13:12 ` fxcoudert at gcc dot gnu dot org
2006-03-03 19:11 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-02-28 13:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-02-28 13:11 -------
This one is growing in popularity :)
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vivekrao4 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] tempary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-02-28 13:12 ` fxcoudert at gcc dot gnu dot org
@ 2006-03-03 19:11 ` pinskia at gcc dot gnu dot org
2006-04-05 4:47 ` [Bug fortran/25619] temporary " hjl at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-03 19:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-03-03 19:11 -------
*** Bug 26550 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uttamp at us dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] temporary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-03-03 19:11 ` pinskia at gcc dot gnu dot org
@ 2006-04-05 4:47 ` hjl at gcc dot gnu dot org
2006-04-12 20:58 ` hjl at gcc dot gnu dot org
2006-04-17 15:14 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2006-04-05 4:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hjl at gcc dot gnu dot org 2006-04-05 04:47 -------
Subject: Bug 25619
Author: hjl
Date: Wed Apr 5 04:47:51 2006
New Revision: 112695
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112695
Log:
gcc/fortran/
2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
PR fortran/25619
* trans-array.c (gfc_conv_expr_descriptor): Only dereference
character pointer when copying temporary.
PR fortran/23634
* trans-array.c (gfc_conv_expr_descriptor): Properly copy
temporary character with non constant size.
gcc/testsuite/
2006-04-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23634
PR fortran/25619
* gfortran.dg/actual_array_constructor_1.f90: New testcase.
Added:
trunk/gcc/testsuite/gfortran.dg/actual_array_constructor_1.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=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] temporary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-04-05 4:47 ` [Bug fortran/25619] temporary " hjl at gcc dot gnu dot org
@ 2006-04-12 20:58 ` hjl at gcc dot gnu dot org
2006-04-17 15:14 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: hjl at gcc dot gnu dot org @ 2006-04-12 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hjl at gcc dot gnu dot org 2006-04-12 20:58 -------
Subject: Bug 25619
Author: hjl
Date: Wed Apr 12 20:58:04 2006
New Revision: 112899
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112899
Log:
gcc/fortran/
2006-04-12 H.J. Lu <hongjiu.lu@intel.com>
PR fortran/25619
Backport from mainline
2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
* trans-array.c (gfc_conv_expr_descriptor): Only dereference
character pointer when copying temporary.
PR fortran/23634
Backport from mainline
2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
* trans-array.c (gfc_conv_expr_descriptor): Properly copy
temporary character with non constant size.
gcc/testsuite/
2006-04-12 H.J. Lu <hongjiu.lu@intel.com>
PR fortran/23634
PR fortran/25619
Backport from mainline
2006-04-04 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/actual_array_constructor_1.f90: New testcase.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/25619] temporary array of constant size character type goes wrong
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-04-12 20:58 ` hjl at gcc dot gnu dot org
@ 2006-04-17 15:14 ` pault at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-04-17 15:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pault at gcc dot gnu dot org 2006-04-17 15:14 -------
HJ has fixed this one.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25619
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-04-17 15:14 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-01 6:36 [Bug fortran/25619] New: ICE in gimplify_expr with chacter type pinskia at gcc dot gnu dot org
2006-01-02 3:08 ` [Bug fortran/25619] tempary array of character type goes wrong pinskia at gcc dot gnu dot org
2006-01-02 3:13 ` [Bug fortran/25619] tempary array of constant size " pinskia at gcc dot gnu dot org
2006-02-21 9:08 ` fxcoudert at gcc dot gnu dot org
2006-02-28 0:25 ` pinskia at gcc dot gnu dot org
2006-02-28 13:12 ` fxcoudert at gcc dot gnu dot org
2006-03-03 19:11 ` pinskia at gcc dot gnu dot org
2006-04-05 4:47 ` [Bug fortran/25619] temporary " hjl at gcc dot gnu dot org
2006-04-12 20:58 ` hjl at gcc dot gnu dot org
2006-04-17 15:14 ` 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).