public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/27378]  New: ICE on unexpected ELSE statement
@ 2006-05-02  9:08 reichelt at gcc dot gnu dot org
  2006-05-02 16:57 ` [Bug fortran/27378] " steven at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-02  9:08 UTC (permalink / raw)
  To: gcc-bugs

The following invalid testcase causes an ICE when compiled with -Wall:

===============
else
===============

The error message is:
 In file bug.f90:1

else
   1
Error: Unexpected ELSE statement at (1)
bug.f90:0: internal compiler error: Segmentation fault


Without -Wall I get:
 In file bug.f90:1

else
   1
Error: Unexpected ELSE statement at (1)
Error: Unexpected end of file in 'bug.f90'

This happens since GCC 4.0.1.


-- 
           Summary: ICE on unexpected ELSE statement
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug fortran/27378] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
@ 2006-05-02 16:57 ` steven at gcc dot gnu dot org
  2006-05-02 19:28 ` kargl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-05-02 16:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steven at gcc dot gnu dot org  2006-05-02 16:57 -------
Index: parse.c
===================================================================
--- parse.c     (revision 113473)
+++ parse.c     (working copy)
@@ -624,6 +624,7 @@ next_statement (void)
       if (gfc_at_eol ())
        {
          if (gfc_option.warn_line_truncation
+             && gfc_current_locus.lb
              && gfc_current_locus.lb->truncated)
            gfc_warning_now ("Line truncated at %C");


-- 

steven 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-05-02 16:57:17
               date|                            |


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


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

* [Bug fortran/27378] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
  2006-05-02 16:57 ` [Bug fortran/27378] " steven at gcc dot gnu dot org
@ 2006-05-02 19:28 ` kargl at gcc dot gnu dot org
  2006-05-07 16:33 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-05-02 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2006-05-02 19:28 -------
(In reply to comment #1)
> Index: parse.c
> ===================================================================
> --- parse.c     (revision 113473)
> +++ parse.c     (working copy)
> @@ -624,6 +624,7 @@ next_statement (void)
>        if (gfc_at_eol ())
>         {
>           if (gfc_option.warn_line_truncation
> +             && gfc_current_locus.lb
>               && gfc_current_locus.lb->truncated)
>             gfc_warning_now ("Line truncated at %C");
> 

Looks like an "Obviously correct" patch.


-- 


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


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

* [Bug fortran/27378] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
  2006-05-02 16:57 ` [Bug fortran/27378] " steven at gcc dot gnu dot org
  2006-05-02 19:28 ` kargl at gcc dot gnu dot org
@ 2006-05-07 16:33 ` fxcoudert at gcc dot gnu dot org
  2006-05-07 16:37 ` [Bug fortran/27378] [4.1 only] " fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-07 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from fxcoudert at gcc dot gnu dot org  2006-05-07 16:33 -------
Subject: Bug 27378

Author: fxcoudert
Date: Sun May  7 16:33:30 2006
New Revision: 113603

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113603
Log:
        PR fortran/27378
        * parse.c (next_statement): Add check to avoid an ICE when
        gfc_current_locus.lb is not set.

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


-- 


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


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

* [Bug fortran/27378] [4.1 only] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-07 16:33 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-07 16:37 ` fxcoudert at gcc dot gnu dot org
  2006-05-08 10:43 ` fxcoudert at gcc dot gnu dot org
  2006-05-08 10:46 ` fxcoudert at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-07 16:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-05-07 16:37 -------
> Looks like an "Obviously correct" patch.

Commited the "Obviously correct" patch after regtesting on i686-linux.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
      Known to fail|                            |4.1.1
      Known to work|                            |4.2.0
   Last reconfirmed|2006-05-02 16:57:17         |2006-05-07 16:37:04
               date|                            |
            Summary|ICE on unexpected ELSE      |[4.1 only] ICE on unexpected
                   |statement                   |ELSE statement
   Target Milestone|---                         |4.1.1


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


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

* [Bug fortran/27378] [4.1 only] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-07 16:37 ` [Bug fortran/27378] [4.1 only] " fxcoudert at gcc dot gnu dot org
@ 2006-05-08 10:43 ` fxcoudert at gcc dot gnu dot org
  2006-05-08 10:46 ` fxcoudert at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08 10:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-05-08 10:43 -------
Subject: Bug 27378

Author: fxcoudert
Date: Mon May  8 10:43:18 2006
New Revision: 113629

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113629
Log:
        PR fortran/27378
        * parse.c (next_statement): Add check to avoid an ICE when
        gfc_current_locus.lb is not set.

Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/parse.c


-- 


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


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

* [Bug fortran/27378] [4.1 only] ICE on unexpected ELSE statement
  2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-08 10:43 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-08 10:46 ` fxcoudert at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08 10:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2006-05-08 10:46 -------
Fixed on 4.1 and mainline.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.1.1                       |
      Known to work|4.2.0                       |4.2.0 4.1.1
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2006-05-08 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02  9:08 [Bug fortran/27378] New: ICE on unexpected ELSE statement reichelt at gcc dot gnu dot org
2006-05-02 16:57 ` [Bug fortran/27378] " steven at gcc dot gnu dot org
2006-05-02 19:28 ` kargl at gcc dot gnu dot org
2006-05-07 16:33 ` fxcoudert at gcc dot gnu dot org
2006-05-07 16:37 ` [Bug fortran/27378] [4.1 only] " fxcoudert at gcc dot gnu dot org
2006-05-08 10:43 ` fxcoudert at gcc dot gnu dot org
2006-05-08 10:46 ` fxcoudert 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).