public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall
@ 2007-01-08 13:08 martin at mpa-garching dot mpg dot de
2007-01-08 13:27 ` [Bug fortran/30408] " burnus at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: martin at mpa-garching dot mpg dot de @ 2007-01-08 13:08 UTC (permalink / raw)
To: gcc-bugs
Current mainline gfortran ICEs when compiling the following code with -Wall:
module linebufmod
implicit none
type linebuf
character(len=80), dimension(:), pointer :: data=>NULL()
end type linebuf
contains
subroutine linebuf_add (buf)
type(linebuf), intent(inout) :: buf
buf%data(1) = "blah"
end subroutine linebuf_add
end module linebufmod
~/tmp>gfortran -v -c linebufmod.F90 -Wall
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /scratch/martin/gcc/configure
--prefix=/afs/mpa/data/martin/ugcc --enable-languages=c++,fortran
Thread model: posix
gcc version 4.3.0 20070108 (experimental)
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.3.0/cc1 -E
-lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v linebufmod.F90
-mtune=generic -Wall -o /tmp/ccEpYWVk.f95
ignoring nonexistent directory
"/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.3.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/afs/mpa/data/martin/ugcc/include
/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.3.0/include
/usr/include
End of search list.
/afs/mpa/data/martin/ugcc/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951
/tmp/ccEpYWVk.f95 -ffree-form -quiet -dumpbase linebufmod.F90 -mtune=generic
-auxbase linebufmod -Wall -version -fpreprocessed -fintrinsic-modules-path
/afs/mpa/data/martin/ugcc/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o
/tmp/cc0Iohmw.s
GNU F95 version 4.3.0 20070108 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.3.0 20070108 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
linebufmod.F90:0: 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.
--
Summary: [gfortran, 4.3 regression]: ICE on valid with -Wall
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
@ 2007-01-08 13:27 ` burnus at gcc dot gnu dot org
2007-01-08 17:42 ` kargl at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-08 13:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-01-08 13:26 -------
0x000000000044fe6e in resolve_code (code=0xe2f690, ns=0xe2eb60) at
fortran/resolve.c:5097
5097 if (sym->ts.cl->length->expr_type == EXPR_CONSTANT)
(gdb) bt
#1 0x000000000045042d in resolve_codes (ns=0xe24b90) at fortran/resolve.c:7278
#2 0x0000000000450495 in gfc_resolve (ns=0xe24b90) at fortran/resolve.c:7302
--
burnus 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-01-08 13:26:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
2007-01-08 13:27 ` [Bug fortran/30408] " burnus at gcc dot gnu dot org
@ 2007-01-08 17:42 ` kargl at gcc dot gnu dot org
2007-01-08 18:55 ` kargl at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-01-08 17:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2007-01-08 17:42 -------
This compiles with
laptop:kargl[218] gfc4x --version
GNU Fortran 95 (GCC) 4.3.0 20061228 (experimental)
Copyright (C) 2006 Free Software Foundation, Inc.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
2007-01-08 13:27 ` [Bug fortran/30408] " burnus at gcc dot gnu dot org
2007-01-08 17:42 ` kargl at gcc dot gnu dot org
@ 2007-01-08 18:55 ` kargl at gcc dot gnu dot org
2007-01-09 6:10 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-01-08 18:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2007-01-08 18:55 -------
This is related to an undocumented warning flag. In options.c, gfortran sets
several warnings to on. One of these is
gfc_option.warn_character_truncation = 1;
If I change this to 0, then your code with -Wall compiles. Fortunately,
gfc_option.warn_character_truncation appears only in decl.c and
resolve.c, and occurs exactly once in both files. A few things need to
occur:
1) Add a -W[no-]character-truncation option.
2) Document the option.
3) Fix Martin's bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
` (2 preceding siblings ...)
2007-01-08 18:55 ` kargl at gcc dot gnu dot org
@ 2007-01-09 6:10 ` jvdelisle at gcc dot gnu dot org
2007-01-10 4:35 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-09 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-01-09 06:10 -------
*** Bug 30405 has been marked as a duplicate of this bug. ***
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |P dot Schaffnit at access
| |dot rwth-aachen dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
` (3 preceding siblings ...)
2007-01-09 6:10 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-10 4:35 ` jvdelisle at gcc dot gnu dot org
2007-01-10 4:37 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-10 4:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-01-10 04:34 -------
Subject: Bug 30408
Author: jvdelisle
Date: Wed Jan 10 04:34:34 2007
New Revision: 120632
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120632
Log:
2007-01-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30408
* resolve.c (resolve_code): Use the code->expr character length
directly to set length of llen.
2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/30408
* lang.opt: Add Wcharacter_truncation option.
* options.c (gfc_init_options): Initialize
gfc_option.warn_character_truncation to zero.
(gfc_handle_option): Add case for OPT_Wcharacter_truncation.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/options.c
trunk/gcc/fortran/resolve.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
` (4 preceding siblings ...)
2007-01-10 4:35 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-10 4:37 ` jvdelisle at gcc dot gnu dot org
2007-01-10 19:21 ` pinskia at gcc dot gnu dot org
2007-01-14 14:50 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-01-10 4:37 UTC (permalink / raw)
To: gcc-bugs
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
` (5 preceding siblings ...)
2007-01-10 4:37 ` jvdelisle at gcc dot gnu dot org
@ 2007-01-10 19:21 ` pinskia at gcc dot gnu dot org
2007-01-14 14:50 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 19:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-01-10 19:20 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/30408] [gfortran, 4.3 regression]: ICE on valid with -Wall
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
` (6 preceding siblings ...)
2007-01-10 19:21 ` pinskia at gcc dot gnu dot org
@ 2007-01-14 14:50 ` pault at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-14 14:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2007-01-14 14:50 -------
Subject: Bug 30408
Author: pault
Date: Sun Jan 14 14:49:50 2007
New Revision: 120772
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120772
Log:
2007-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
Back port from trunk
PR fortran/30408
* lang.opt: Add Wcharacter_truncation option.
* options.c (gfc_init_options): Initialize
gfc_option.warn_character_truncation to zero.
(gfc_handle_option): Add case for OPT_Wcharacter_truncation.
PR fortran/30408
* resolve.c (resolve_code): Use the code->expr character length
directly to set length of llen.
2007-01-14 Paul Thomas <pault@gcc.gnu.org>
Backports from trunk
PR fortran/23232
* decl.c (gfc_in_match_data, gfc_set_in_match_data): New
functions to signal that a DATA statement is being matched.
(gfc_match_data): Call gfc_set_in_match_data on entry and on
exit.
* gfortran.h : Add prototypes for above.
* expr.c (check_init_expr): Avoid check on parameter or
variable if gfc_in_match_data is true.
(gfc_match_init_expr): Do not call error on non-reduction of
expression if gfc_in_match_data is true.
PR fortran/27996
PR fortran/27998
* decl.c (gfc_set_constant_character_len): Add boolean arg to
flag array constructor resolution. Warn if string is being
truncated. Standard dependent error if string is padded. Set
new arg to false for all three calls to
gfc_set_constant_character_len.
* match.h : Add boolean arg to prototype for
gfc_set_constant_character_len.
* gfortran.h : Add warn_character_truncation to gfc_options.
* options.c (set_Wall): Set warn_character_truncation if -Wall
is set.
* resolve.c (resolve_code): Warn if rhs string in character
assignment has to be truncated.
* array.c (gfc_resolve_character_array_constructor): Set new
argument to true for call to gfc_set_constant_character_len.
PR fortran/30410
* trans-decl.c (gfc_sym_mangled_function_id): Module, external
symbols must not have the module name prepended.
2007-01-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23232
* gfortran.dg/data_implied_do_1.f90: New test.
PR fortran/27996
PR fortran/27998
* gfortran.dg/char_length_1.f90: New test.
PR fortran/30410
* gfortran.dg/external_procedures_2.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/char_length_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/data_implied_do_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/external_procedures_2.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/array.c
branches/gcc-4_2-branch/gcc/fortran/decl.c
branches/gcc-4_2-branch/gcc/fortran/expr.c
branches/gcc-4_2-branch/gcc/fortran/gfortran.h
branches/gcc-4_2-branch/gcc/fortran/lang.opt
branches/gcc-4_2-branch/gcc/fortran/match.h
branches/gcc-4_2-branch/gcc/fortran/options.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-decl.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30408
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-01-14 14:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-08 13:08 [Bug fortran/30408] New: [gfortran, 4.3 regression]: ICE on valid with -Wall martin at mpa-garching dot mpg dot de
2007-01-08 13:27 ` [Bug fortran/30408] " burnus at gcc dot gnu dot org
2007-01-08 17:42 ` kargl at gcc dot gnu dot org
2007-01-08 18:55 ` kargl at gcc dot gnu dot org
2007-01-09 6:10 ` jvdelisle at gcc dot gnu dot org
2007-01-10 4:35 ` jvdelisle at gcc dot gnu dot org
2007-01-10 4:37 ` jvdelisle at gcc dot gnu dot org
2007-01-10 19:21 ` pinskia at gcc dot gnu dot org
2007-01-14 14:50 ` 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).