public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18271] ICE with computed array declaration
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
@ 2005-11-04 15:32 ` manfred99 at gmx dot ch
  2005-11-04 15:56 ` anlauf at gmx dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: manfred99 at gmx dot ch @ 2005-11-04 15:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from manfred99 at gmx dot ch  2005-11-04 15:32 -------

1) There is an easy way to circumvent the ICE: 
if you add an explicit type conversion for IMAX, such as in
      REAL:: AUX1(25000+INT(0.82*float(IMAX)))
the ICE goes away and gfortran compiles it successfully and 
without warnings, even with "-std=f95".



2) WRT invalid code:
I checked the code with the Lahey Source Check, ifort, SUN f95 and g95:

--> Lahey/Fujitsu Fortran 95 (lf95): no errors, no warnings

--> Lahey Fortran 90 (lf90): error at INT expression
Line 5, file SOURCE.F90
      REAL:: AUX1(25000+INT(0.82*IMAX))
                        |
FATAL -- Specification expression required.


--> Intel ifort 8.1: no errors, no warnings with "-warn all -stand f90"

--> SUN Workshop f95 6.2: no errors, no warnings with "-w4"

--> g95: no errors, no warnings with "-std=f95"


-- 


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


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

* [Bug fortran/18271] ICE with computed array declaration
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
  2005-11-04 15:32 ` [Bug fortran/18271] ICE with computed array declaration manfred99 at gmx dot ch
@ 2005-11-04 15:56 ` anlauf at gmx dot de
  2006-01-09 22:31 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: anlauf at gmx dot de @ 2005-11-04 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from anlauf at gmx dot de  2005-11-04 15:56 -------
(In reply to comment #2)
> This is invalid code, INT is not allowed in a specification expression.

I'm not a language lawyer, but if I read it correctly, then
INT is a standard intrinsic function and thus allowed in a
restricted expression (F2003 draft standard, 7.1.6, R729, C710 (8))
Am I missing something?


-- 

anlauf at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de


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


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

* [Bug fortran/18271] ICE with computed array declaration
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
  2005-11-04 15:32 ` [Bug fortran/18271] ICE with computed array declaration manfred99 at gmx dot ch
  2005-11-04 15:56 ` anlauf at gmx dot de
@ 2006-01-09 22:31 ` pinskia at gcc dot gnu dot org
  2006-05-07 16:27 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-09 22:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-01-09 22:31 -------
we no longer ICE on this code but we still accept it.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |accepts-invalid


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



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

* [Bug fortran/18271] ICE with computed array declaration
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-01-09 22:31 ` pinskia at gcc dot gnu dot org
@ 2006-05-07 16:27 ` fxcoudert at gcc dot gnu dot org
  2006-05-08  9:22 ` [Bug fortran/18271] INT is allowed in a specification expression fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-07 16:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2006-05-07 16:27 -------
(In reply to comment #6)
> I'm not a language lawyer, but if I read it correctly, then
> INT is a standard intrinsic function and thus allowed in a
> restricted expression (F2003 draft standard, 7.1.6, R729, C710 (8))
> Am I missing something?

I've just sent a question to comp.lang.fortran. We'll see what the experts have
to say.


-- 

fxcoudert at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/18271] INT is allowed in a specification expression
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-05-07 16:27 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-08  9:22 ` fxcoudert at gcc dot gnu dot org
  2006-05-08  9:46 ` anlauf at gmx dot de
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08  9:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2006-05-08 09:22 -------
It appears that the original testcase, involving INT in as specification
expression, is valid F95 and F2003. It was not valid F90, however, because the
return type of INT is real. This is confirmed by the results of different
compilers and Bob Corbett on c.l.f, so I'm closing this one as INVALID.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Keywords|accepts-invalid             |
         Resolution|                            |INVALID
            Summary|ICE with computed array     |INT is allowed in a
                   |declaration                 |specification expression


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


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

* [Bug fortran/18271] INT is allowed in a specification expression
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-05-08  9:22 ` [Bug fortran/18271] INT is allowed in a specification expression fxcoudert at gcc dot gnu dot org
@ 2006-05-08  9:46 ` anlauf at gmx dot de
  2006-05-08  9:57 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: anlauf at gmx dot de @ 2006-05-08  9:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from anlauf at gmx dot de  2006-05-08 09:46 -------
(In reply to comment #9)
> It appears that the original testcase, involving INT in as specification
> expression, is valid F95 and F2003. It was not valid F90, however, because the
> return type of INT is real. This is confirmed by the results of different
> compilers and Bob Corbett on c.l.f, so I'm closing this one as INVALID.

FX,

I do not understand why you are closing this one as INVALID,
since you just argued that it VALID F95 and F2003.
Anyway, current gfortran seems to accept this code, so this
issue appears resolved.
Please do not break it! ;-)


-- 


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


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

* [Bug fortran/18271] INT is allowed in a specification expression
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2006-05-08  9:46 ` anlauf at gmx dot de
@ 2006-05-08  9:57 ` fxcoudert at gcc dot gnu dot org
  2006-05-08  9:59 ` fxcoudert at gcc dot gnu dot org
  2006-05-08 10:03 ` fxcoudert at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08  9:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from fxcoudert at gcc dot gnu dot org  2006-05-08 09:57 -------
(In reply to comment #10)
> I do not understand why you are closing this one as INVALID,
> since you just argued that it VALID F95 and F2003.

I'm saying that the bug report, which says "This illegal code is wrongly
accepted by gfortran", is INVALID, because the code is indeed legal.

> Please do not break it! ;-)

I'll be adding this bit of code to the testsuite.


-- 


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


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

* [Bug fortran/18271] INT is allowed in a specification expression
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2006-05-08  9:57 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-08  9:59 ` fxcoudert at gcc dot gnu dot org
  2006-05-08 10:03 ` fxcoudert at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08  9:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2006-05-08 09:59 -------
Subject: Bug 18271

Author: fxcoudert
Date: Mon May  8 09:59:09 2006
New Revision: 113627

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113627
Log:
        PR libfortran/18271
        * gfortran.dg/spec_expr_3.f90: New test.

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


-- 


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


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

* [Bug fortran/18271] INT is allowed in a specification expression
       [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2006-05-08  9:59 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-08 10:03 ` fxcoudert at gcc dot gnu dot org
  8 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-08 10:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from fxcoudert at gcc dot gnu dot org  2006-05-08 10:03 -------
Subject: Bug 18271

Author: fxcoudert
Date: Mon May  8 10:03:11 2006
New Revision: 113628

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113628
Log:
        PR libfortran/18271
        * gfortran.dg/spec_expr_3.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/spec_expr_3.f90
      - copied unchanged from r113627,
trunk/gcc/testsuite/gfortran.dg/spec_expr_3.f90
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-18271-9562@http.gcc.gnu.org/bugzilla/>
2005-11-04 15:32 ` [Bug fortran/18271] ICE with computed array declaration manfred99 at gmx dot ch
2005-11-04 15:56 ` anlauf at gmx dot de
2006-01-09 22:31 ` pinskia at gcc dot gnu dot org
2006-05-07 16:27 ` fxcoudert at gcc dot gnu dot org
2006-05-08  9:22 ` [Bug fortran/18271] INT is allowed in a specification expression fxcoudert at gcc dot gnu dot org
2006-05-08  9:46 ` anlauf at gmx dot de
2006-05-08  9:57 ` fxcoudert at gcc dot gnu dot org
2006-05-08  9:59 ` fxcoudert at gcc dot gnu dot org
2006-05-08 10:03 ` 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).