public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds
@ 2007-02-14 22:17 anlauf at gmx dot de
2007-02-15 0:03 ` [Bug fortran/30799] " kargl at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: anlauf at gmx dot de @ 2007-02-14 22:17 UTC (permalink / raw)
To: gcc-bugs
Hi,
the following invalid code shows that gfortran does not reject
bad kinds for logicals:
program gfcbug57
implicit none
!
! These are logical kinds known by gfortran and many other compilers:
!
print *, kind (.true._1) ! This prints "1"
print *, kind (.true._2) ! This prints "2"
print *, kind (.true._4) ! This prints "4"
print *, kind (.true._8) ! This prints "8"
!
! These are very strange (read: bad (invalid?)) logical kinds,
! handled inconsistently by gfortran (there's no logical(kind=0) etc.)
!
print *, kind (.true._0) ! This prints "0"
print *, kind (.true._3) ! This prints "3"
print *, kind (.true._123) ! This prints "123"
!
! Here gfortran bails out with a runtime error:
!
print *, .true._3 ! "Internal Error: bad integer kind"
end program gfcbug57
Cheers,
-ha
--
Summary: Inconsistent handling of bad (invalid) LOGICAL kinds
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30799] Inconsistent handling of bad (invalid) LOGICAL kinds
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
@ 2007-02-15 0:03 ` kargl at gcc dot gnu dot org
2007-02-15 0:38 ` kargl at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 0:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kargl at gcc dot gnu dot org 2007-02-15 00:03 -------
Harald,
You have a knack for finding some of the weirdness bugs.
Anyway, I have a patch that detects and reports the illegal
kind type values. I'll submit it shortly to the list if
regression testing passes.
--
kargl 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-02-15 00:03:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30799] Inconsistent handling of bad (invalid) LOGICAL kinds
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
2007-02-15 0:03 ` [Bug fortran/30799] " kargl at gcc dot gnu dot org
@ 2007-02-15 0:38 ` kargl at gcc dot gnu dot org
2007-02-15 2:03 ` kargl at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 0:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2007-02-15 00:38 -------
A patch is here:
http://gcc.gnu.org/ml/gcc-patches/2007-02/msg01311.html
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |kargl at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-02-15 00:03:48 |2007-02-15 00:38:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30799] Inconsistent handling of bad (invalid) LOGICAL kinds
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
2007-02-15 0:03 ` [Bug fortran/30799] " kargl at gcc dot gnu dot org
2007-02-15 0:38 ` kargl at gcc dot gnu dot org
@ 2007-02-15 2:03 ` kargl at gcc dot gnu dot org
2007-02-15 19:33 ` kargl at gcc dot gnu dot org
2007-02-15 19:48 ` kargl at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 2:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from kargl at gcc dot gnu dot org 2007-02-15 02:03 -------
Subject: Bug 30799
Author: kargl
Date: Thu Feb 15 02:02:56 2007
New Revision: 121975
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121975
Log:
2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30799
* primary.c (match_logical_constant): Return MATCH_ERROR on invalid
kind.
* gfortran.dg/logical_2.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/logical_2.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/primary.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30799] Inconsistent handling of bad (invalid) LOGICAL kinds
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
` (2 preceding siblings ...)
2007-02-15 2:03 ` kargl at gcc dot gnu dot org
@ 2007-02-15 19:33 ` kargl at gcc dot gnu dot org
2007-02-15 19:48 ` kargl at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 19:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from kargl at gcc dot gnu dot org 2007-02-15 19:33 -------
Subject: Bug 30799
Author: kargl
Date: Thu Feb 15 19:33:13 2007
New Revision: 122012
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122012
Log:
2007-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30799
* primary.c (match_logical_constant): Return MATCH_ERROR on invalid
kind.
* gfortran.dg/logical_2.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/logical_2.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/primary.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/30799] Inconsistent handling of bad (invalid) LOGICAL kinds
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
` (3 preceding siblings ...)
2007-02-15 19:33 ` kargl at gcc dot gnu dot org
@ 2007-02-15 19:48 ` kargl at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-02-15 19:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kargl at gcc dot gnu dot org 2007-02-15 19:47 -------
Fixed on 4.1, 4.2, and trunk.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30799
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-02-15 19:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14 22:17 [Bug fortran/30799] New: Inconsistent handling of bad (invalid) LOGICAL kinds anlauf at gmx dot de
2007-02-15 0:03 ` [Bug fortran/30799] " kargl at gcc dot gnu dot org
2007-02-15 0:38 ` kargl at gcc dot gnu dot org
2007-02-15 2:03 ` kargl at gcc dot gnu dot org
2007-02-15 19:33 ` kargl at gcc dot gnu dot org
2007-02-15 19:48 ` kargl 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).