[Bug fortran/15326] ICE with assumed length character strings

2005-09-08 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-08 
18:46 ---
Subject: Bug 15326

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-09-08 18:46:06

Modified files:
gcc/fortran: ChangeLog trans-array.c trans-expr.c 
gcc/testsuite  : ChangeLog 
Added files:
gcc/testsuite/gfortran.dg: char_result_1.f90 char_result_2.f90 
   char_result_3.f90 char_result_4.f90 
   char_result_5.f90 char_result_6.f90 
   char_result_7.f90 char_result_8.f90 

Log message:
PR fortran/15326
* trans-array.c (gfc_add_loop_ss_code): Set ss-string_length in
the GFC_SS_FUNCTION case too.
* trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
to function pointers as well as function decls.
(gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
(gfc_init_interface_mapping, gfc_free_interface_mapping)
(gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
(gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
(gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
(gfc_apply_interface_mapping_to_ref)
(gfc_apply_interface_mapping_to_expr)
(gfc_apply_interface_mapping): New functions.
(gfc_conv_function_call): Evaluate the arguments before working
out where the result should go.  Make the null pointer case provide
the string length in parmse.string_length.  Cope with non-constant
string lengths, using the above functions to evaluate such lengths.
Use a temporary typespec; don't assign to sym-cl-backend_decl.
Don't assign to se-string_length when returning a cached array
descriptor.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gccr1=1.540r2=1.541
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-array.c.diff?cvsroot=gccr1=1.56r2=1.57
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-expr.c.diff?cvsroot=gccr1=1.59r2=1.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gccr1=1.6030r2=1.6031
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_1.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_2.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_3.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_4.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_5.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_6.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_7.f90.diff?cvsroot=gccr1=NONEr2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/char_result_8.f90.diff?cvsroot=gccr1=NONEr2=1.1



-- 


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


[Bug fortran/15326] ICE with assumed length character strings

2005-09-08 Thread rsandifo at gcc dot gnu dot org

--- Additional Comments From rsandifo at gcc dot gnu dot org  2005-09-08 
18:51 ---
Patch committed to trunk.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug fortran/15326] ICE with assumed length character strings

2005-08-31 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-31 
15:15 ---
*** Bug 23654 has been marked as a duplicate of this bug. ***

-- 
   What|Removed |Added

 CC||kloedej at knmi dot nl


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


[Bug fortran/15326] ICE with assumed length character strings

2005-08-31 Thread rsandifo at gcc dot gnu dot org

--- Additional Comments From rsandifo at gcc dot gnu dot org  2005-08-31 
20:42 ---
Working on a patch.

-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rsandifo at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-06-06 00:36:27 |2005-08-31 20:42:48
   date||


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


[Bug fortran/15326] ICE with assumed length character strings

2005-02-12 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-12 
16:56 ---
*** Bug 19927 has been marked as a duplicate of this bug. ***

-- 
   What|Removed |Added

 CC||sgk at troutmask dot apl dot
   ||washington dot edu


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


[Bug fortran/15326] ICE with assumed length character strings

2005-01-06 Thread tobi at gcc dot gnu dot org


-- 
   What|Removed |Added

OtherBugsDependingO||19292
  nThis||


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


[Bug fortran/15326] ICE with assumed length character strings

2004-10-10 Thread tobi at gcc dot gnu dot org

--- Additional Comments From tobi at gcc dot gnu dot org  2004-10-10 21:04 ---
The patch is wrong because it does only solve part of the problem.

With the testcase from the mailing list posting referred to above, we get code
like this:
  {
logical4 D.464;
char[1 .. .d] * pstr.0;

pstr.0 = (char[1 .. .d] *) _gfortran_internal_malloc (.d);
d (pstr.0, .d, t1, 10);
where .d is used uninitialized.

If the function D from the testcase is declared external, with no interface, we
hit the same assertion as without the patch.

-- 
   What|Removed |Added

   Keywords|patch   |


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


[Bug fortran/15326] ICE with assumed length character strings

2004-10-10 Thread Tobias dot Schlueter at physik dot uni-muenchen dot de

--- Additional Comments From Tobias dot Schlueter at physik dot uni-muenchen dot 
de  2004-10-10 21:08 ---
Subject: Re:  ICE with assumed length character strings

tobi at gcc dot gnu dot org wrote:
 If the function D from the testcase is declared external, with no interface, we
 hit the same assertion as without the patch.
 
Ugh, messed up when editing. This is meant to read:
If the function D from the testcase is external, not contained, we hit the
same assertion as without the patch.



-- 


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