public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32703] New: ICE with [trim(character_variable)]
@ 2007-07-09 15:29 vivekrao4 at yahoo dot com
2007-07-09 18:33 ` [Bug fortran/32703] " langton at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: vivekrao4 at yahoo dot com @ 2007-07-09 15:29 UTC (permalink / raw)
To: gcc-bugs
For the program
program array_char
implicit none
character (len=1) :: x
x = "a"
print*,[trim(x)]
end program array_char
compiling on Windows XP with
gfortran -v xconcat.f90
produces an ICE:
Driving: gfortran -v xconcat.f90 -lgfortranbegin -lgfortran
Using built-in specs.
Target: i386-pc-mingw32
Configured with: ../trunk/configure --prefix=/mingw
--enable-languages=c,fortran --with-gmp=/home/coudert/local --disable-nls
--with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror
--enable-bootstrap --enable-threads --build=i386-pc-mingw32 --disable-shared
--enable-libgomp
Thread model: win32
gcc version 4.3.0 20070706 (experimental)
c:/programs/gfortran/bin/../libexec/gcc/i386-pc-mingw32/4.3.0/f951.exe
xconcat.f90 -quiet -dumpbase xconcat.f90 -mtune=i386 -auxbase xconcat -version
-fintrinsic-modules-path
c:/programs/gfortran/bin/../lib/gcc/i386-pc-mingw32/4.3.0/finclude -o
C:\DOCUME~1\vrao\LOCALS~1\Temp/cc8grzTr.s
GNU F95 version 4.3.0 20070706 (experimental) (i386-pc-mingw32)
compiled by GNU C version 4.3.0 20070706 (experimental), GMP version
4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
xconcat.f90: In function 'MAIN__':
xconcat.f90:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
The program works if the line
print*,[trim(x)]
is replaced with
print*,[x]
or
print*,trim(x)
--
Summary: ICE with [trim(character_variable)]
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vivekrao4 at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
@ 2007-07-09 18:33 ` langton at gcc dot gnu dot org
2007-07-09 18:45 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: langton at gcc dot gnu dot org @ 2007-07-09 18:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from langton at gcc dot gnu dot org 2007-07-09 18:32 -------
Confirmed. The segfault occurs on trans-array.c:1380 because e->ts->cl is
null.
--
langton 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 |2007-07-09 18:32:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
2007-07-09 18:33 ` [Bug fortran/32703] " langton at gcc dot gnu dot org
@ 2007-07-09 18:45 ` burnus at gcc dot gnu dot org
2007-07-10 20:54 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-09 18:45 UTC (permalink / raw)
To: gcc-bugs
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19276
nThis| |
Keywords| |ice-on-valid-code
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
2007-07-09 18:33 ` [Bug fortran/32703] " langton at gcc dot gnu dot org
2007-07-09 18:45 ` burnus at gcc dot gnu dot org
@ 2007-07-10 20:54 ` pault at gcc dot gnu dot org
2007-08-30 22:11 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-07-10 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2007-07-10 20:54 -------
My coming character patch fixes this. I'll take it.
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|2007-07-09 18:32:53 |2007-07-10 20:54:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
` (2 preceding siblings ...)
2007-07-10 20:54 ` pault at gcc dot gnu dot org
@ 2007-08-30 22:11 ` pault at gcc dot gnu dot org
2007-08-30 22:18 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-08-30 22:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2007-08-30 22:11 -------
Subject: Bug 32703
Author: pault
Date: Thu Aug 30 22:10:55 2007
New Revision: 127939
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127939
Log:
2007-08-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31879
PR fortran/31197
PR fortran/31258
PR fortran/32703
* gfortran.h : Add prototype for gfc_resolve_substring_charlen.
* resolve.c (gfc_resolve_substring_charlen): New function.
(resolve_ref): Call gfc_resolve_substring_charlen.
(gfc_resolve_character_operator): New function.
(gfc_resolve_expr): Call the new functions in cases where the
character length is missing.
* iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
transpose, unpack): Call gfc_resolve_substring_charlen for
source expressions that are character and have a reference.
* trans.h (gfc_trans_init_string_length) Change name to
gfc_conv_string_length; modify references in trans-expr.c,
trans-array.c and trans-decl.c.
* trans-expr.c (gfc_trans_string_length): Handle case of no
backend_decl.
(gfc_conv_aliased_arg): Remove code for treating substrings
and replace with call to gfc_trans_string_length.
* trans-array.c (gfc_conv_expr_descriptor): Remove code for
treating strings and call gfc_trans_string_length instead.
2007-08-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31879
* gfortran.dg/char_length_7.f90: New test.
* gfortran.dg/char_length_9.f90: New test.
* gfortran.dg/char_assign_1.f90: Add extra warning.
PR fortran/31197
PR fortran/31258
* gfortran.dg/char_length_8.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/char_length_7.f90
trunk/gcc/testsuite/gfortran.dg/char_length_8.f90
trunk/gcc/testsuite/gfortran.dg/char_length_9.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/iresolve.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/char_assign_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
` (3 preceding siblings ...)
2007-08-30 22:11 ` pault at gcc dot gnu dot org
@ 2007-08-30 22:18 ` pault at gcc dot gnu dot org
2007-08-31 6:10 ` burnus at gcc dot gnu dot org
2007-08-31 6:21 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-08-30 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2007-08-30 22:18 -------
This no longer segfaults and it generates correct code for valid fortran.
However,
program array_char
implicit none
character (len=2) :: x, y
x = "a "
y = "cd"
print*,[trim(x),trim(y)]
end program array_char
does not generate the runtime error that it should, so I am leaving this PR
open. I have unassigned myself for now but might well return to this soon.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|pault at gcc dot gnu dot org|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
Keywords|ice-on-valid-code |accepts-invalid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
` (4 preceding siblings ...)
2007-08-30 22:18 ` pault at gcc dot gnu dot org
@ 2007-08-31 6:10 ` burnus at gcc dot gnu dot org
2007-08-31 6:21 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-31 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2007-08-31 06:10 -------
(In reply to comment #4)
> does not generate the runtime error that it should, so I am leaving this PR
> open. I have unassigned myself for now but might well return to this soon.
I think it should be enough to give this diagnostic only with -fbounds-check.
Additionally, I filled PR 33254 to track this.
I would thus suggest to close this PR as fixed - or at least remove remove the
blocking of PR32834.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/32703] ICE with [trim(character_variable)]
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
` (5 preceding siblings ...)
2007-08-31 6:10 ` burnus at gcc dot gnu dot org
@ 2007-08-31 6:21 ` burnus at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-31 6:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2007-08-31 06:21 -------
(Close the bug myself.)
The ICE mentioned in the subject is FIXED for the trunk.
As said, PR 33254 tracks the run-time diagnostic for different string lengths
in array constructors.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Keywords|accepts-invalid |ice-on-valid-code
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32703
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-31 6:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09 15:29 [Bug fortran/32703] New: ICE with [trim(character_variable)] vivekrao4 at yahoo dot com
2007-07-09 18:33 ` [Bug fortran/32703] " langton at gcc dot gnu dot org
2007-07-09 18:45 ` burnus at gcc dot gnu dot org
2007-07-10 20:54 ` pault at gcc dot gnu dot org
2007-08-30 22:11 ` pault at gcc dot gnu dot org
2007-08-30 22:18 ` pault at gcc dot gnu dot org
2007-08-31 6:10 ` burnus at gcc dot gnu dot org
2007-08-31 6:21 ` burnus 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).