[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-17 Thread dfranke at gcc dot gnu dot org


--- Comment #2 from dfranke at gcc dot gnu dot org  2007-05-17 17:33 ---
Confirmed. Adding Brooks Moses to CC as he recently worked on this.

(gdb) bt
#0  gfc_internal_error (
format=0x86ca3bc "Invalid expression in gfc_target_expr_size.")
at ../../../gcc/gcc/fortran/error.c:820
#1  0x080a8a02 in gfc_target_expr_size (e=0x887f880)
at ../../../gcc/gcc/fortran/target-memory.c:109
#2  0x0809e30f in gfc_simplify_transfer (source=0x887f880, mold=0x887fcc8,
size=0x0) at ../../../gcc/gcc/fortran/simplify.c:3887
#3  0x08068e7f in do_simplify (specific=0x88695f8, e=0x887f828)
at ../../../gcc/gcc/fortran/intrinsic.c:3133
#4  0x08069972 in gfc_intrinsic_func_interface (expr=0x887f828, error_flag=1)
at ../../../gcc/gcc/fortran/intrinsic.c:3399
#5  0x08095b67 in gfc_resolve_expr (e=0x887f828)
at ../../../gcc/gcc/fortran/resolve.c:1456
#6  0x08051125 in gfc_resolve_array_constructor (expr=0x887fd20)
at ../../../gcc/gcc/fortran/array.c:1514
#7  0x0809418f in gfc_resolve_expr (e=0x887fd20)
at ../../../gcc/gcc/fortran/resolve.c:3316
#8  0x080981f7 in resolve_code (code=0x887fd78, ns=0x88451b0)
at ../../../gcc/gcc/fortran/resolve.c:5161
#9  0x08099bb5 in resolve_codes (ns=0x88451b0)
at ../../../gcc/gcc/fortran/resolve.c:7452
#10 0x08099bf3 in gfc_resolve (ns=0x88451b0)
at ../../../gcc/gcc/fortran/resolve.c:7471
---Type  to continue, or q  to quit---
#11 0x0808d69c in gfc_parse_file () at ../../../gcc/gcc/fortran/parse.c:3248
#12 0x080aea4d in gfc_be_parse_file (set_yydebug=0)
at ../../../gcc/gcc/fortran/f95-lang.c:303
#13 0x082ffdf8 in toplev_main (argc=2, argv=0xbfa9cd34)
at ../../../gcc/gcc/toplev.c:1051
#14 0x080f25bf in main (argc=Cannot access memory at address 0x0
) at ../../../gcc/gcc/main.c:35


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu dot
   ||org
OtherBugsDependingO||31237
  nThis||
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  GCC build triplet||[EMAIL PROTECTED]
   ||m
  Known to fail||4.3.0
  Known to work||4.1.1 4.2.1
   Last reconfirmed|-00-00 00:00:00 |2007-05-17 17:33:59
   date||
Summary|Internal Error occurs when  |[4.3 regression] Internal
   |TRANSFER contains hollerith |Error occurs when TRANSFER
   |argument|contains hollerith argument


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-17 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2007-05-17 17:59 ---
Add Brooks to CC, again.
Brooks, could you have a look at this one?


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||brooks at gcc dot gnu dot
   ||org
  GCC build triplet|[EMAIL PROTECTED]|
   |m   |


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-17 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2007-05-17 18:18 ---
Works for me on OSX 10.3.9 gfortran 4.3.0 20070511:

PROGRAM lsstr
INTEGER, DIMENSION(1) :: i
i = (/ TRANSFER(4HSOLR, 0) /)
print *, i
END PROGRAM lsstr

outputs 1397705810 (83797682 hexa) with gfortran, xlf, and g95, but gfortran
emits a warning:

Warning: Extension: Hollerith constant at (1)


-- 


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-17 Thread dfranke at gcc dot gnu dot org


--- Comment #5 from dfranke at gcc dot gnu dot org  2007-05-17 20:15 ---
Dominique, target-memory.c (frame #1 in the backtrace) was newly introduced at
20070516.


-- 


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-17 Thread brooks at gcc dot gnu dot org


--- Comment #6 from brooks at gcc dot gnu dot org  2007-05-17 22:45 ---
Yeah, this is to be expected, I think.  Holleriths store the memory
representation but not the "semantic" representation of their value, and
transfer tries to fold things and gets confused.

There's probably an easy fix for this, or there's also the fact that when the
transfer implementation is updated to do proper in-memory stuff (to account for
things like TRANSFER(TRANSFER(34, .TRUE.), 0) which should return 34), fixing
this will fall out of it if done right.

I'm accepting this because I plan to do the latter in a way that will fix this
as a side effect.  However, if someone cares, I can also put in a code to do
this appropriately in the short term as well.


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |brooks at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-05-17 17:33:59 |2007-05-17 22:45:07
   date||


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-28 Thread brooks at gcc dot gnu dot org


--- Comment #7 from brooks at gcc dot gnu dot org  2007-05-28 20:53 ---
Subject: Bug 31972

Author: brooks
Date: Mon May 28 20:53:09 2007
New Revision: 125141

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125141
Log:
PR 31972/fortran
* target-memory.c (gfc_target_expr_size): Add handling
for size of BT_HOLLERITH variables.
* check.c (gfc_check_transfer): Reject BT_HOLLERITH
variables in MOLD argument of TRANSFER.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/target-memory.c


-- 


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-28 Thread brooks at gcc dot gnu dot org


--- Comment #8 from brooks at gcc dot gnu dot org  2007-05-28 20:54 ---
Subject: Bug 31972

Author: brooks
Date: Mon May 28 20:54:49 2007
New Revision: 125142

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125142
Log:
PR fortran/31972
* transfer_hollerith_1.f90: New test.

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


-- 


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



[Bug fortran/31972] [4.3 regression] Internal Error occurs when TRANSFER contains hollerith argument

2007-05-28 Thread brooks at gcc dot gnu dot org


--- Comment #9 from brooks at gcc dot gnu dot org  2007-05-28 20:57 ---
Fixed, as per above commits.


-- 

brooks at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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