------- Comment #6 from burnus at gcc dot gnu dot org  2007-04-03 17:54 -------
Could you try the following code in ia64 and i686?

PROGRAM test
INTEGER(KIND=1) :: i(1)
i = (/ TRANSFER("a", 0_1) /)
print *, i
END PROGRAM test

I think this will compile and print "97". Is this indeed the case on ia64 adb
i686?

The original program has one problem:

   i = (/ TRANSFER("a", 0_1) /)

is not well defined as "i" is kind=1 whereas "0" is kind=4.


gfortran should follow NAG f95 and print the following warning:
  Warning: x.f90, line 3: Intrinsic TRANSFER has partly undefined result

Additionally, gfortran seems to generate questionable code for "0": "i" is "0"
(under x86-64) and not the expected "97". While the result is not well defined,
 using "97" as do NAG f95, g95 and ifort would be highly desirable.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic, ice-on-valid-
                   |                            |code, wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-03 17:54:10
               date|                            |
            Summary|When I compile the following|TRANSFER with mold kind /=
                   |program I get the message   |lval kind: ICE on ia64,
                   |"GNU MP: Cannot reallocate  |i686; no warning
                   |memory"                     |


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

Reply via email to