This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/79312] Empty array in assignment not correctly type-checked


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

--- Comment #2 from harper at msor dot vuw.ac.nz ---
Another manifestation of this bug:

   program emptyarray6
     implicit none
     logical,allocatable:: OK(:)
     OK = [logical::]==[real::]
     print *,OK
   end program emptyarray6

compiles and prints nothing but I think it should have refused to compile
(logical expression)==(real expression)

On Wed, 1 Feb 2017, dominiq at lps dot ens.fr wrote:

> Date: Wed, 1 Feb 2017 19:21:00 +0000
> From: dominiq at lps dot ens.fr <gcc-bugzilla@gcc.gnu.org>
> To: John Harper <John.Harper@vuw.ac.nz>
> Subject: [Bug fortran/79312] Empty array in assignment not correctly
>     type-checked
> Resent-Date: Thu, 2 Feb 2017 08:21:23 +1300 (NZDT)
> Resent-From: <john.harper@vuw.ac.nz>
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79312
>
> Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|UNCONFIRMED                 |NEW
>   Last reconfirmed|                            |2017-02-01
>     Ever confirmed|0                           |1
>
> --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Confirmed from at least 4.8 up to trunk (7.0). Note that compiling
>
>   program emptyarray5
>    implicit none
>    real a(1)
>    a = .true.
>    print *,a
>  end program emptyarray5
>
> gives
>
>    a = .true.
>        1
> Error: Can't convert LOGICAL(4) to REAL(4) at (1)
>
> -- 
> You are receiving this mail because:
> You reported the bug.
>


-- John Harper, School of Mathematics and Statistics
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 5276 fax (+64)(4)463 5045

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]