public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape
@ 2005-05-30 15:36 enok at lysator dot liu dot se
  2005-06-02 18:15 ` [Bug fortran/21825] " fxcoudert at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: enok at lysator dot liu dot se @ 2005-05-30 15:36 UTC (permalink / raw)
  To: gcc-bugs

The following code causes segmentation fault with gfortran

PROGRAM TST
  CHARACTER(2), PARAMETER :: ETYPE(2,2) = &
       RESHAPE((/ 'a1','b1','a2','b2' /),(/2,2/))
END PROGRAM TST


> gfortran4 -c tst.f90
tst.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: Segmentation fault on 2D array initialization with
                    reshape
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: enok at lysator dot liu dot se
                CC: gcc-bugs 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=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
@ 2005-06-02 18:15 ` fxcoudert at gcc dot gnu dot org
  2005-08-15 12:06 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-06-02 18:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-06-02 18:15 -------
Confirmed on i386-linux. Here is the GDB backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x08057e09 in add_init_expr_to_sym (name=0xbffff430 "etype", initp=0xbffff42c, 
    var_locus=0xbffff418) at ../../../gcc/gcc/fortran/decl.c:759
759                       gfc_free_expr (init->ts.cl->length);
(gdb) where
#0  0x08057e09 in add_init_expr_to_sym (name=0xbffff430 "etype", 
    initp=0xbffff42c, var_locus=0xbffff418)
    at ../../../gcc/gcc/fortran/decl.c:759
#1  0x0805851b in variable_decl () at ../../../gcc/gcc/fortran/decl.c:1069
#2  0x080599c3 in gfc_match_data_decl ()
    at ../../../gcc/gcc/fortran/decl.c:1995
#3  0x0807d7b8 in match_word (str=0x0, subr=0x8059885 <gfc_match_data_decl>, 
    old_locus=0xbffff4d8) at ../../../gcc/gcc/fortran/parse.c:65
#4  0x0807d90d in decode_statement () at ../../../gcc/gcc/fortran/parse.c:131
#5  0x0807e5ea in next_free () at ../../../gcc/gcc/fortran/parse.c:352
#6  0x0807e850 in next_statement () at ../../../gcc/gcc/fortran/parse.c:498
#7  0x080809ca in gfc_parse_file () at ../../../gcc/gcc/fortran/parse.c:2557
#8  0x08098d9c in gfc_be_parse_file (set_yydebug=0)
    at ../../../gcc/gcc/fortran/f95-lang.c:263
#9  0x0844f2a0 in compile_file () at ../../../gcc/gcc/toplev.c:1000
#10 0x08450838 in do_compile () at ../../../gcc/gcc/toplev.c:2123
#11 0x0845089f in toplev_main (argc=2, argv=0xbffff6a4)
    at ../../../gcc/gcc/toplev.c:2155
#12 0x080c9142 in main (argc=2, argv=0xbffff6a4) at ../../../gcc/gcc/main.c:35

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|x86_64-unknown-linux-gnu    |
   GCC host triplet|x86_64-unknown-linux-gnu    |
 GCC target triplet|x86_64-unknown-linux-gnu    |
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-02 18:15:05
               date|                            |
            Summary|Segmentation fault on 2D    |2D array initialization with
                   |array initialization with   |reshape
                   |reshape                     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
  2005-06-02 18:15 ` [Bug fortran/21825] " fxcoudert at gcc dot gnu dot org
@ 2005-08-15 12:06 ` pinskia at gcc dot gnu dot org
  2005-08-15 12:09 ` [Bug fortran/21825] [4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 12:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 12:04 -------
*** Bug 23394 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dave dot offiler at
                   |                            |metoffice dot gov dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] [4.1 Regression] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
  2005-06-02 18:15 ` [Bug fortran/21825] " fxcoudert at gcc dot gnu dot org
  2005-08-15 12:06 ` pinskia at gcc dot gnu dot org
@ 2005-08-15 12:09 ` pinskia at gcc dot gnu dot org
  2005-08-15 12:26 ` [Bug fortran/21825] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 12:09 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.1.0
      Known to work|                            |4.0.0
            Summary|2D array initialization with|[4.1 Regression] 2D array
                   |reshape                     |initialization with reshape
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] [4.0/4.1 Regression] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
                   ` (2 preceding siblings ...)
  2005-08-15 12:09 ` [Bug fortran/21825] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-08-15 12:26 ` pinskia at gcc dot gnu dot org
  2005-08-22  3:39 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-15 12:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-15 12:13 -------
This is a regression from 4.0.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.1.0                       |4.1.0 4.0.2
            Summary|[4.1 Regression] 2D array   |[4.0/4.1 Regression] 2D
                   |initialization with reshape |array initialization with
                   |                            |reshape
   Target Milestone|4.1.0                       |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] [4.0/4.1 Regression] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
                   ` (3 preceding siblings ...)
  2005-08-15 12:26 ` [Bug fortran/21825] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-08-22  3:39 ` mmitchel at gcc dot gnu dot org
  2005-09-07 10:41 ` rsandifo at gcc dot gnu dot org
  2005-09-18 20:00 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-08-22  3:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-08-22 03:37 -------
Fortran is not release-critical; removing target milestone.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] [4.0/4.1 Regression] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
                   ` (4 preceding siblings ...)
  2005-08-22  3:39 ` mmitchel at gcc dot gnu dot org
@ 2005-09-07 10:41 ` rsandifo at gcc dot gnu dot org
  2005-09-18 20:00 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2005-09-07 10:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rsandifo at gcc dot gnu dot org  2005-09-07 10:40 -------
Fixed by the partial patch for 19269


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19269
              nThis|                            |
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug fortran/21825] [4.0/4.1 Regression] 2D array initialization with reshape
  2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
                   ` (5 preceding siblings ...)
  2005-09-07 10:41 ` rsandifo at gcc dot gnu dot org
@ 2005-09-18 20:00 ` tkoenig at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-09-18 20:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-09-18 20:00 -------
Not fixed in 4.0:

$ cat > tst.f90
PROGRAM TST
  CHARACTER(2), PARAMETER :: ETYPE(2,2) = &
       RESHAPE((/ 'a1','b1','a2','b2' /),(/2,2/))
END PROGRAM TST
$ gfortran tst.f90
tst.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.
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0/configure --prefix=/home/ig25
--enable-languages=c,fortran
Thread model: posix
gcc version 4.0.2 20050917 (prerelease)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
   Target Milestone|4.1.0                       |4.0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21825


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-09-18 20:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 15:36 [Bug fortran/21825] New: Segmentation fault on 2D array initialization with reshape enok at lysator dot liu dot se
2005-06-02 18:15 ` [Bug fortran/21825] " fxcoudert at gcc dot gnu dot org
2005-08-15 12:06 ` pinskia at gcc dot gnu dot org
2005-08-15 12:09 ` [Bug fortran/21825] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-15 12:26 ` [Bug fortran/21825] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-08-22  3:39 ` mmitchel at gcc dot gnu dot org
2005-09-07 10:41 ` rsandifo at gcc dot gnu dot org
2005-09-18 20:00 ` tkoenig 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).