public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement
@ 2015-10-22 17:20 gerhard.steinmetz.fortran@t-online.de
  2015-10-22 19:32 ` [Bug fortran/68055] " gerhard.steinmetz.fortran@t-online.de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-22 17:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

            Bug ID: 68055
           Summary: ICE on using unsupported kinds in program without
                    program statement
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

Without an explicit program statement :

$ cat z1.f90
!program p
   real*9 :: c
   write (c, '(i3)') 1
end


$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: gfc_validate_kind(): Got bad kind

---

Detected with program statement :

$ cat z2.f90
program p
   real*9 :: c
   write (c, '(i3)') 1
end


$ gfortran -g -O0 -Wall -fcheck=all z2.f90
z2.f90:2:9:

    real*9 :: c
         1
Error: Old-style type declaration REAL*9 not supported at (1)
z2.f90:3:10:

    write (c, '(i3)') 1
          1
Error: UNIT specification at (1) must be an INTEGER expression or a CHARACTER
variable


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
@ 2015-10-22 19:32 ` gerhard.steinmetz.fortran@t-online.de
  2015-10-23 23:25 ` kargl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-22 19:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Simplified. Still different behaviour :

$ cat z3.f90
!program p
   integer*3 c
   print *, c
end

$ gfortran -g -O0 -Wall -fcheck=all z3.f90
z3.f90:2:0:

    integer*3 c
 1
internal compiler error: Segmentation fault


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
  2015-10-22 19:32 ` [Bug fortran/68055] " gerhard.steinmetz.fortran@t-online.de
@ 2015-10-23 23:25 ` kargl at gcc dot gnu.org
  2015-10-23 23:54 ` sgk at troutmask dot apl.washington.edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-23 23:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-23
                 CC|                            |kargl at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |kargl at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from kargl at gcc dot gnu.org ---
I could not generate an ICE with z1.f90.  Instead, I
the following error:

% gfc6 -c g1.f90
g1.f90:3:7:

    c = 1
       1
Error: Can't convert INTEGER(4) to INTEGER(3) at (1)

with gcc 4.9.x, 5.2.x, and 6.  gfortran should reject
the *3.  I have a patch that does now does

% gfc6 -c g1.f90
g1.f90:2:12:

    integer*3 c
            1
Error: Old-style type declaration INTEGER*3 not supported at (1)


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
  2015-10-22 19:32 ` [Bug fortran/68055] " gerhard.steinmetz.fortran@t-online.de
  2015-10-23 23:25 ` kargl at gcc dot gnu.org
@ 2015-10-23 23:54 ` sgk at troutmask dot apl.washington.edu
  2015-10-24 17:10 ` kargl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-10-23 23:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
Patch posted at 

https://gcc.gnu.org/ml/fortran/2015-10/msg00112.html

As I don't see an ICE, Gerhard can you test this?


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
                   ` (2 preceding siblings ...)
  2015-10-23 23:54 ` sgk at troutmask dot apl.washington.edu
@ 2015-10-24 17:10 ` kargl at gcc dot gnu.org
  2015-10-26 15:40 ` gerhard.steinmetz.fortran@t-online.de
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-24 17:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sat Oct 24 17:09:35 2015
New Revision: 229288

URL: https://gcc.gnu.org/viewcvs?rev=229288&root=gcc&view=rev
Log:
2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/68055
        * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
        declarations.

2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/68055
        * gfortran.dg/pr68055.f90: New case.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr68055.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
                   ` (3 preceding siblings ...)
  2015-10-24 17:10 ` kargl at gcc dot gnu.org
@ 2015-10-26 15:40 ` gerhard.steinmetz.fortran@t-online.de
  2015-10-29 20:44 ` kargl at gcc dot gnu.org
  2015-10-29 20:45 ` kargl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-26 15:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

--- Comment #5 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Sorry for answering late, but most of the time I am "offline" 
from several streams. 

Up to now I'm using mostly precompiled/configured packages from 
SUSE, currently gcc version 5.2.1 (+r228597). For several reasons,
I'm avoiding self-compiled versions, including gcc/gfortran.  
Hence my efforts are limited to black box tests and validations.

But of course I will test more on this issue with newly available
packages from software.opensuse.org as soon as possible.

Thank you very much for the continuing development and great support.


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
                   ` (4 preceding siblings ...)
  2015-10-26 15:40 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-10-29 20:44 ` kargl at gcc dot gnu.org
  2015-10-29 20:45 ` kargl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-29 20:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

--- Comment #6 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Oct 29 20:44:09 2015
New Revision: 229560

URL: https://gcc.gnu.org/viewcvs?rev=229560&root=gcc&view=rev
Log:
2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/68055
        * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
        declarations.

2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/68055
        * gfortran.dg/pr68055.f90: New case.

Added:
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr68055.f90
Modified:
    branches/gcc-5-branch/gcc/fortran/ChangeLog
    branches/gcc-5-branch/gcc/fortran/decl.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug fortran/68055] ICE on using unsupported kinds in program without program statement
  2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
                   ` (5 preceding siblings ...)
  2015-10-29 20:44 ` kargl at gcc dot gnu.org
@ 2015-10-29 20:45 ` kargl at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-29 20:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68055

kargl at gcc dot gnu.org changed:

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

--- Comment #7 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch.  Thanks for the bug report.


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

end of thread, other threads:[~2015-10-29 20:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-22 17:20 [Bug fortran/68055] New: ICE on using unsupported kinds in program without program statement gerhard.steinmetz.fortran@t-online.de
2015-10-22 19:32 ` [Bug fortran/68055] " gerhard.steinmetz.fortran@t-online.de
2015-10-23 23:25 ` kargl at gcc dot gnu.org
2015-10-23 23:54 ` sgk at troutmask dot apl.washington.edu
2015-10-24 17:10 ` kargl at gcc dot gnu.org
2015-10-26 15:40 ` gerhard.steinmetz.fortran@t-online.de
2015-10-29 20:44 ` kargl at gcc dot gnu.org
2015-10-29 20:45 ` kargl at gcc dot gnu.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).