public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
@ 2006-06-07  3:17 ` jvdelisle at gcc dot gnu dot org
  2006-06-07  5:19 ` pinskia at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-06-07  3:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jvdelisle at gcc dot gnu dot org  2006-06-07 03:13 -------
This is no longer giving a segfault on i686-pc-linux-gnu.

 In file foo.f90:3

    subroutine FOO
                 1
Error: MODULE attribute conflicts with PROCEDURE attribute at (1)
 In file foo.f90:4

        integer :: I
                   1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file foo.f90:5

        character(len=selected_int_kind(I)) :: C
                                               1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file foo.f90:6

    end subroutine
      1
Error: Expecting END MODULE statement at (1)
 In file foo.f90:7

end
  1
 Internal Error at (1):
 gfc_get_default_type(): Bad symbol


Maybe this is good enough?


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
  2006-06-07  3:17 ` [Bug fortran/18923] segfault after subroutine name confusion jvdelisle at gcc dot gnu dot org
@ 2006-06-07  5:19 ` pinskia at gcc dot gnu dot org
  2006-06-29 17:44 ` tobi at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-07  5:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-06-07 05:07 -------
(In reply to comment #5)
> This is no longer giving a segfault on i686-pc-linux-gnu.
> end
>   1
>  Internal Error at (1):
>  gfc_get_default_type(): Bad symbol
> Maybe this is good enough?

There is an internal error here still.


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
  2006-06-07  3:17 ` [Bug fortran/18923] segfault after subroutine name confusion jvdelisle at gcc dot gnu dot org
  2006-06-07  5:19 ` pinskia at gcc dot gnu dot org
@ 2006-06-29 17:44 ` tobi at gcc dot gnu dot org
  2006-07-03 18:35 ` reichelt at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: tobi at gcc dot gnu dot org @ 2006-06-29 17:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tobi at gcc dot gnu dot org  2006-06-29 17:05 -------
I don't see an internal error any longer, closing as WORKSFORME.


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-06-29 17:44 ` tobi at gcc dot gnu dot org
@ 2006-07-03 18:35 ` reichelt at gcc dot gnu dot org
  2006-10-20  3:26 ` jvdelisle at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-03 18:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from reichelt at gcc dot gnu dot org  2006-07-03 18:35 -------
With the following testcase I still get an internal error:

=================================================
module FOO
contains
    subroutine FOO
        integer :: I
        character(len=selected_int_kind(I)) :: C, D, E, F, G
    end subroutine
end
=================================================

 In file PR18923.f90:3

    subroutine FOO
                 1
Error: MODULE attribute conflicts with PROCEDURE attribute at (1)
 In file PR18923.f90:4

        integer :: I
                   1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file PR18923.f90:5

        character(len=selected_int_kind(I)) :: C, D, E, F, G
                                                           1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file PR18923.f90:6

    end subroutine
      1
Error: Expecting END MODULE statement at (1)
 In file PR18923.f90:7

end
  1
 Internal Error at (1):
 gfc_get_default_type(): Bad symbol


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-07-03 18:35 ` reichelt at gcc dot gnu dot org
@ 2006-10-20  3:26 ` jvdelisle at gcc dot gnu dot org
  2007-02-01 20:28 ` reichelt at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-10-20  3:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2006-10-20 03:26 -------


*** This bug has been marked as a duplicate of 27954 ***


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-10-20  3:26 ` jvdelisle at gcc dot gnu dot org
@ 2007-02-01 20:28 ` reichelt at gcc dot gnu dot org
  2007-02-02  2:26 ` jvdelisle at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-02-01 20:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from reichelt at gcc dot gnu dot org  2007-02-01 20:28 -------
The bug reappeared on mainline. But PR 27954 did not.
So either this is not really a duplicate - or Jerry's fix was incomplete.

Jerry, would you mind having a look? Thanks!


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu dot
                   |                            |org
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2007-02-01 20:28 ` reichelt at gcc dot gnu dot org
@ 2007-02-02  2:26 ` jvdelisle at gcc dot gnu dot org
  2007-05-18 10:06 ` dfranke at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-02-02  2:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jvdelisle at gcc dot gnu dot org  2007-02-02 02:25 -------
This bug was not a duplicate of pr27954.  That was a fat fingers error that I
corrected in the PR header, but I can't delete comment #9.  So as far as I know
this has not been fixed yet and never was.


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-06-04 10:28:44         |2007-02-02 02:25:56
               date|                            |


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2007-02-02  2:26 ` jvdelisle at gcc dot gnu dot org
@ 2007-05-18 10:06 ` dfranke at gcc dot gnu dot org
  2007-05-18 20:10 ` reichelt at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-18 10:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from dfranke at gcc dot gnu dot org  2007-05-18 11:06 -------
The testcase of comment #8 does not segfault on mainline (20070517) any more,
but still does in the 4.2 branch.

Messages for mainline (note the empty names in "Error: '' at (1) is not a
function"):

$> gfortran-svn -g -Wall -c pr18923.f90
pr18923.f90:3.16:

  subroutine FOO
               1
Error: MODULE attribute conflicts with PROCEDURE attribute at (1)
pr18923.f90:4.16:

    integer :: I
               1
Error: Unexpected data declaration statement in CONTAINS section at (1)
pr18923.f90:5.56:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                                                       1
Error: Unexpected data declaration statement in CONTAINS section at (1)
pr18923.f90:6.5:

  end subroutine
    1
Error: Expecting END MODULE statement at (1)
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: '' at (1) is not a function
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: '' at (1) is not a function
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: '' at (1) is not a function
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: '' at (1) is not a function
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: '' at (1) is not a function
pr18923.f90:5.18:

    character(len=selected_int_kind(I)) :: C, D, E, F, G
                 1
Error: Expression at (1) must be of INTEGER type



Backtrace for 4.2:
Program received signal SIGSEGV, Segmentation fault.
gfc_resolve_expr (e=0x8612478) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:1751
1751            expr->ts = expr->symtree->n.sym->result->ts;
(gdb) bt
#0  gfc_resolve_expr (e=0x8612478) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:1751
#1  0x08092ade in resolve_index_expr (e=0x8611160) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:5362
#2  0x08092bfb in resolve_charlen (cl=<value optimized out>) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:5386
#3  0x0809311f in resolve_types (ns=0x86119c0) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:7255
#4  0x080930a7 in resolve_types (ns=0x8610a20) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:7248
#5  0x08095e2c in gfc_resolve (ns=0x8610a20) at
/home/daniel/svn/gcc-4.2/gcc/fortran/resolve.c:7311
#6  0x0808a309 in gfc_parse_file () at
/home/daniel/svn/gcc-4.2/gcc/fortran/parse.c:3222
#7  0x080ac02d in gfc_be_parse_file (set_yydebug=0) at
/home/daniel/svn/gcc-4.2/gcc/fortran/f95-lang.c:303
#8  0x08310faa in toplev_main (argc=2, argv=0xbf87ea84) at
/home/daniel/svn/gcc-4.2/gcc/toplev.c:1033
#9  0x080d893f in main (argc=2, argv=0x1) at
/home/daniel/svn/gcc-4.2/gcc/main.c:35


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2007-05-18 10:06 ` dfranke at gcc dot gnu dot org
@ 2007-05-18 20:10 ` reichelt at gcc dot gnu dot org
  2007-05-18 20:44 ` dfranke at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-05-18 20:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from reichelt at gcc dot gnu dot org  2007-05-18 21:10 -------
The testcase still crashes on mainline (and 4.1 and 4.2 branch) if I compile it
without "-g" or with "--param ggc-min-expand=0 --param ggc-min-heapsize=0 -g".

Looks like there are some invalid pointers. Whether the program crashes or not
depends on the garbage they are pointing to.


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2007-05-18 20:10 ` reichelt at gcc dot gnu dot org
@ 2007-05-18 20:44 ` dfranke at gcc dot gnu dot org
  2007-05-18 21:11 ` dfranke at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-18 20:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from dfranke at gcc dot gnu dot org  2007-05-18 21:44 -------
Although I can not observe a crash on my machine with either flag setting,
valgrind shows loads of

==32659== Invalid read of size 4
==32659==    at 0x809432F: gfc_resolve_expr (resolve.c:3220)
==32659==  Address 0x4213C2C is 20 bytes inside a block of size 24 free'd
==32659==    at 0x402119F: free (vg_replace_malloc.c:233)
==32659==    by 0x80A4D42: gfc_undo_symbols (symbol.c:1959)

in varying places, always related to gfc_undo_symbols ...


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2007-05-18 20:44 ` dfranke at gcc dot gnu dot org
@ 2007-05-18 21:11 ` dfranke at gcc dot gnu dot org
  2007-05-18 21:53 ` jvdelisle at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-05-18 21:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from dfranke at gcc dot gnu dot org  2007-05-18 22:11 -------
Eventually, I got a traceable segfault with this shortened testcase:

$> cat pr18923.f90
module FOO
contains
  subroutine FOO
    character(len=selected_int_kind(0)) :: C
  end subroutine
end

Program received signal SIGSEGV, Segmentation fault.
gfc_resolve_expr (e=0x887f8a8) at ../../../gcc/gcc/fortran/resolve.c:1747
1747            expr->ts = expr->symtree->n.sym->result->ts;
(gdb) bt
#0  gfc_resolve_expr (e=0x887f8a8) at ../../../gcc/gcc/fortran/resolve.c:1747
#1  0x08095bbe in resolve_index_expr (e=0x887f380) at
../../../gcc/gcc/fortran/resolve.c:5482
#2  0x08095c2f in resolve_charlen (cl=0x8845148) at
../../../gcc/gcc/fortran/resolve.c:5508
#3  0x0809746f in resolve_types (ns=0x887f020) at
../../../gcc/gcc/fortran/resolve.c:7401
#4  0x08097557 in resolve_types (ns=0x88451b0) at
../../../gcc/gcc/fortran/resolve.c:7414
#5  0x08099bfc in gfc_resolve (ns=0x88451b0) at
../../../gcc/gcc/fortran/resolve.c:7477
#6  0x0808d6ac in gfc_parse_file () at ../../../gcc/gcc/fortran/parse.c:3248
#7  0x080aeabd in gfc_be_parse_file (set_yydebug=0) at
../../../gcc/gcc/fortran/f95-lang.c:303
#8  0x082ffe68 in toplev_main (argc=2, argv=0xbf93d354) at
../../../gcc/gcc/toplev.c:1051
#9  0x080f262f in main (argc=2, argv=0x1) at ../../../gcc/gcc/main.c:35

Most notable point are the identical expressions in this if/else clause
(resolve.c:1740f):
  /* Make sure that the expression has a typespec that works.  */
  if (expr->ts.type == BT_UNKNOWN)
    {
      if (expr->symtree->n.sym->result
            && expr->symtree->n.sym->result->ts.type != BT_UNKNOWN)
        expr->ts = expr->symtree->n.sym->result->ts;
      else
        expr->ts = expr->symtree->n.sym->result->ts;       /* crashes here */
    }

Otherwise, I'm out of my wits here. Hope this helps someone?!


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2007-05-18 21:11 ` dfranke at gcc dot gnu dot org
@ 2007-05-18 21:53 ` jvdelisle at gcc dot gnu dot org
  2007-05-18 22:53 ` jvdelisle at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-18 21:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from jvdelisle at gcc dot gnu dot org  2007-05-18 22:53 -------
There is no guarantee that you are hitting the same problem, but if so, this is
very helpful (sometimes :) )


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2007-05-18 21:53 ` jvdelisle at gcc dot gnu dot org
@ 2007-05-18 22:53 ` jvdelisle at gcc dot gnu dot org
  2007-05-21 15:25 ` patchapp at dberlin dot org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-18 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from jvdelisle at gcc dot gnu dot org  2007-05-18 23:52 -------
Created an attachment (id=13582)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13582&action=view)
Patch to eliminate segfault

This patch eliminates the segfault from the original test case and the last
test case which happen in to different places.  The first test case segfault
was caused by the duplicate else clause.  That was sneaky.  I was staring at it
quite a while before I noticed it.


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
                   |dot org                     |org
             Status|REOPENED                    |ASSIGNED


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2007-05-18 22:53 ` jvdelisle at gcc dot gnu dot org
@ 2007-05-21 15:25 ` patchapp at dberlin dot org
  2007-05-23  4:16 ` jvdelisle at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-21 15:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from patchapp at dberlin dot org  2007-05-21 16:25 -------
Subject: Bug number PR18923

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01264.html


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2007-05-21 15:25 ` patchapp at dberlin dot org
@ 2007-05-23  4:16 ` jvdelisle at gcc dot gnu dot org
  2007-06-02 21:10 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-23  4:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from jvdelisle at gcc dot gnu dot org  2007-05-23 05:15 -------
Subject: Bug 18923

Author: jvdelisle
Date: Wed May 23 04:15:25 2007
New Revision: 124979

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124979
Log:
2007-05-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/18923
        * resolve.c (resolve_function): Don't call resolve_global_procedure if
        there is no name. Delete duplicated statement in ELSE clause.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2007-05-23  4:16 ` jvdelisle at gcc dot gnu dot org
@ 2007-06-02 21:10 ` patchapp at dberlin dot org
  2007-06-05 20:24 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 26+ messages in thread
From: patchapp at dberlin dot org @ 2007-06-02 21:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from patchapp at dberlin dot org  2007-06-02 21:10 -------
Subject: Bug number PR18923

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-06/msg00111.html


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2007-06-02 21:10 ` patchapp at dberlin dot org
@ 2007-06-05 20:24 ` jvdelisle at gcc dot gnu dot org
  2007-06-06  1:21 ` jvdelisle at gcc dot gnu dot org
  2007-06-06  1:23 ` jvdelisle at gcc dot gnu dot org
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-05 20:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from jvdelisle at gcc dot gnu dot org  2007-06-05 20:23 -------
Subject: Bug 18923

Author: jvdelisle
Date: Tue Jun  5 20:23:44 2007
New Revision: 125342

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125342
Log:
2007-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR fortran/18923
        * parse.c (decode_statement): Don't call gfc_undo_symbols on
MATCH_ERROR
        for ST_FUNCTION since it is called in reject_statement.
        (parse_contained): If error, loop back after reject_statement and try
        again.  Free the namespace if an error occured.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/parse.c


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2007-06-05 20:24 ` jvdelisle at gcc dot gnu dot org
@ 2007-06-06  1:21 ` jvdelisle at gcc dot gnu dot org
  2007-06-06  1:23 ` jvdelisle at gcc dot gnu dot org
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-06  1:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from jvdelisle at gcc dot gnu dot org  2007-06-06 01:21 -------
Subject: Bug 18923

Author: jvdelisle
Date: Wed Jun  6 01:21:29 2007
New Revision: 125353

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125353
Log:
2007-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR testsuite/18923
        * gfortran.dg/invalid_contains_1.f90: New test.
        * gfortran.dg/invalid_contains_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/invalid_contains_1.f90
    trunk/gcc/testsuite/gfortran.dg/invalid_contains_2.f90
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
       [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2007-06-06  1:21 ` jvdelisle at gcc dot gnu dot org
@ 2007-06-06  1:23 ` jvdelisle at gcc dot gnu dot org
  18 siblings, 0 replies; 26+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-06  1:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from jvdelisle at gcc dot gnu dot org  2007-06-06 01:23 -------
Fixed on trunk. Closing


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
                   ` (5 preceding siblings ...)
  2005-07-08  1:44 ` mmitchel at gcc dot gnu dot org
@ 2005-09-18 20:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-18 20:02 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
                   ` (4 preceding siblings ...)
  2005-06-13  3:28 ` pinskia at gcc dot gnu dot org
@ 2005-07-08  1:44 ` mmitchel at gcc dot gnu dot org
  2005-09-18 20:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 26+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-08  1:44 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
                   ` (3 preceding siblings ...)
  2005-06-06  7:59 ` reichelt at gcc dot gnu dot org
@ 2005-06-13  3:28 ` pinskia at gcc dot gnu dot org
  2005-07-08  1:44 ` mmitchel at gcc dot gnu dot org
  2005-09-18 20:02 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-13  3:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-13 03:27 -------
Hmm, on powerpc-darwin built at -O0, we don't get a seg fault but on i686-pc-linux-gnu with a 
bootstrapped compiler we do.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
                   ` (2 preceding siblings ...)
  2005-06-06  0:42 ` pinskia at gcc dot gnu dot org
@ 2005-06-06  7:59 ` reichelt at gcc dot gnu dot org
  2005-06-13  3:28 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-06-06  7:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-06-06 07:59 -------
With the following testcase I still get a segfault:

=================================================
module FOO
contains
    subroutine FOO
        integer :: I
        character(len=selected_int_kind(I)) :: C
    end subroutine
end
=================================================


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
  2004-12-14 22:35 ` [Bug fortran/18923] " tobi at gcc dot gnu dot org
  2005-05-22 19:26 ` fxcoudert at gcc dot gnu dot org
@ 2005-06-06  0:42 ` pinskia at gcc dot gnu dot org
  2005-06-06  7:59 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-06  0:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-06 00:41 -------
Fixed in 4.0.1, we no longer get an internal error:
 In file t.f:3

  subroutine foo(i)
               1
Error: PROGRAM attribute conflicts with PROCEDURE attribute at (1)
 In file t.f:4

    integer :: i
               1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file t.f:5

    character(len=selected_int_kind(i)) :: c
                                           1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file t.f:6

  end subroutine bar
    1
Error: Expecting END PROGRAM statement at (1)
 In file t.f:5

    character(len=selected_int_kind(i)) :: c
                 1
Error: Expression at (1) must be of INTEGER type
 In file t.f:5

    character(len=selected_int_kind(i)) :: c
                 1
Error: Expression at (1) must be of INTEGER type

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.1


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
  2004-12-14 22:35 ` [Bug fortran/18923] " tobi at gcc dot gnu dot org
@ 2005-05-22 19:26 ` fxcoudert at gcc dot gnu dot org
  2005-06-06  0:42 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-05-22 19:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-05-22 19:26 -------
There is no segfault any more:

$ gfc pr18923.f90
 In file pr18923.f90:3

  subroutine foo(i)
               1
Error: PROGRAM attribute conflicts with PROCEDURE attribute at (1)
 In file pr18923.f90:4

    integer :: i
               1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file pr18923.f90:5

    character(len=selected_int_kind(i)) :: c
                                           1
Error: Unexpected data declaration statement in CONTAINS section at (1)
 In file pr18923.f90:6

  end subroutine bar
    1
Error: Expecting END PROGRAM statement at (1)
 In file pr18923.f90:7

end program foo
              1
 Internal Error at (1):
 gfc_get_default_type(): Bad symbol

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-12-14 22:35:13         |2005-05-22 19:26:20
               date|                            |


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


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

* [Bug fortran/18923] segfault after subroutine name confusion
  2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
@ 2004-12-14 22:35 ` tobi at gcc dot gnu dot org
  2005-05-22 19:26 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 26+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-14 22:35 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-14 22:35:13
               date|                            |


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


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

end of thread, other threads:[~2007-06-06  1:23 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-18923-9515@http.gcc.gnu.org/bugzilla/>
2006-06-07  3:17 ` [Bug fortran/18923] segfault after subroutine name confusion jvdelisle at gcc dot gnu dot org
2006-06-07  5:19 ` pinskia at gcc dot gnu dot org
2006-06-29 17:44 ` tobi at gcc dot gnu dot org
2006-07-03 18:35 ` reichelt at gcc dot gnu dot org
2006-10-20  3:26 ` jvdelisle at gcc dot gnu dot org
2007-02-01 20:28 ` reichelt at gcc dot gnu dot org
2007-02-02  2:26 ` jvdelisle at gcc dot gnu dot org
2007-05-18 10:06 ` dfranke at gcc dot gnu dot org
2007-05-18 20:10 ` reichelt at gcc dot gnu dot org
2007-05-18 20:44 ` dfranke at gcc dot gnu dot org
2007-05-18 21:11 ` dfranke at gcc dot gnu dot org
2007-05-18 21:53 ` jvdelisle at gcc dot gnu dot org
2007-05-18 22:53 ` jvdelisle at gcc dot gnu dot org
2007-05-21 15:25 ` patchapp at dberlin dot org
2007-05-23  4:16 ` jvdelisle at gcc dot gnu dot org
2007-06-02 21:10 ` patchapp at dberlin dot org
2007-06-05 20:24 ` jvdelisle at gcc dot gnu dot org
2007-06-06  1:21 ` jvdelisle at gcc dot gnu dot org
2007-06-06  1:23 ` jvdelisle at gcc dot gnu dot org
2004-12-10 13:00 [Bug fortran/18923] New: " Thomas dot Koenig at online dot de
2004-12-14 22:35 ` [Bug fortran/18923] " tobi at gcc dot gnu dot org
2005-05-22 19:26 ` fxcoudert at gcc dot gnu dot org
2005-06-06  0:42 ` pinskia at gcc dot gnu dot org
2005-06-06  7:59 ` reichelt at gcc dot gnu dot org
2005-06-13  3:28 ` pinskia at gcc dot gnu dot org
2005-07-08  1:44 ` mmitchel at gcc dot gnu dot org
2005-09-18 20:02 ` pinskia 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).