[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-04-22 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-04-23 05:33 ---
Subject: Bug 25669

Author: pault
Date: Sun Apr 23 05:33:16 2006
New Revision: 113191

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=113191
Log:
2006-04-23  Paul Thomas  [EMAIL PROTECTED]

PR fortran/27122
* resolve.c (resolve_function): Remove general restriction on auto
character length function interfaces.
(gfc_resolve_uops): Check restrictions on defined operator
procedures.
(resolve_types): Call the check for defined operators.

PR fortran/27113
* trans-array.c (get_array_ctor_var_strlen): Remove typo in enum.
Part of the fix in 4.2, which does not work in 4.1 because the
divergence is now too great.

PR fortran/26822
* intrinsic.c (add_functions): Mark LOGICAL as elemental.

PR fortran/26787
* expr.c (gfc_check_assign): Extend scope of error to include
assignments to a procedure in the main program or, from a
module or internal procedure that is not that represented by
the lhs symbol. Use VARIABLE rather than l-value in message.

PR fortran/25597
* trans-decl.c (gfc_trans_deferred_vars): Check if an array
result, is also automatic character length.  If so, process
the character length. Note that this fixes the bug in 4.2
but not here in 4.1 because the trees have diverged too much.
Manifestly correct, so applied anyway.

PR fortran/18803
PR fortran/25669
PR fortran/26834
* trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
data.info.dimen for bound intrinsics.
* trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
UBOUND intrinsics and supply their shape information to the ss
and the loop.

PR fortran/27124
* trans_expr.c (gfc_trans_function_call):  Add a new block, post,
in to which all the argument post blocks are put.  Add this block
to se-pre after a byref call or to se-post, otherwise.

2006-04-23  Paul Thomas  [EMAIL PROTECTED]

PR fortran/27122
* gfortran.dg/defined_operators_1.f90: New test.
* gfortran.dg/assumed_charlen_function_1.f90: Add new error and
remove old ones associated, incorrectly, with Note 5.46.

PR fortran/26787
* gfortran.dg/proc_assign_1.f90: New test.
* gfortran.dg/procedure_lvalue.f90: Change message.
* gfortran.dg/namelist_4.f90: Add new error.

PR fortran/27089
* gfortran.dg/specification_type_resolution_1.f90

PR fortran/18803
PR fortran/25669
PR fortran/26834
* gfortran.dg/bounds_temporaries_1.f90: New test.

PR fortran/27124
* gfortran.dg/array_return_value_1.f90: New test.



Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/array_return_value_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/bounds_temporaries_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/defined_operators_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/proc_assign_1.f90
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/expr.c
branches/gcc-4_1-branch/gcc/fortran/intrinsic.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-array.c
branches/gcc-4_1-branch/gcc/fortran/trans-decl.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/namelist_4.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/procedure_lvalue.f90


-- 


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



[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-04-22 Thread pault at gcc dot gnu dot org


--- Comment #9 from pault at gcc dot gnu dot org  2006-04-23 05:44 ---
Fixed on trunk and 4.1

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-04-15 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-04-16 03:45 ---
Subject: Bug 25669

Author: pault
Date: Sun Apr 16 03:45:24 2006
New Revision: 112981

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=112981
Log:
2006-04-16  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26822
* intrinsic.c (add_functions): Mark LOGICAL as elemental.

PR fortran/26787
* expr.c (gfc_check_assign): Extend scope of error to include
assignments to a procedure in the main program or, from a
module or internal procedure that is not that represented by
the lhs symbol. Use VARIABLE rather than l-value in message.

PR fortran/27096
* trans-array.c (gfc_trans_deferred_array): If the backend_decl
is not a descriptor, dereference and then test and use the type.

PR fortran/25597
* trans-decl.c (gfc_trans_deferred_vars): Check if an array
result, is also automatic character length.  If so, process
the character length.

PR fortran/18803
PR fortran/25669
PR fortran/26834
* trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
data.info.dimen for bound intrinsics.
* trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
UBOUND intrinsics and supply their shape information to the ss
and the loop.

PR fortran/27124
* trans_expr.c (gfc_trans_function_call):  Add a new block, post,
in to which all the argument post blocks are put.  Add this block
to se-pre after a byref call or to se-post, otherwise.

2006-04-16  Paul Thomas  [EMAIL PROTECTED]

PR fortran/26787
* gfortran.dg/proc_assign_1.f90: New test.
* gfortran.dg/procedure_lvalue.f90: Change message.
* gfortran.dg/namelist_4.f90: Add new error.

PR fortran/27096
* gfortran.dg/auto_pointer_array_result_1.f90

PR fortran/27089
* gfortran.dg/specification_type_resolution_1.f90

PR fortran/18803
PR fortran/25669
PR fortran/26834
* gfortran.dg/bounds_temporaries_1.f90: New test.

PR fortran/27124
* gfortran.dg/array_return_value_1.f90: New test.



Added:
trunk/gcc/testsuite/gfortran.dg/array_return_value_1.f90
trunk/gcc/testsuite/gfortran.dg/auto_char_pointer_array_result_1.f90
trunk/gcc/testsuite/gfortran.dg/auto_pointer_array_result_1.f90
trunk/gcc/testsuite/gfortran.dg/bounds_temporaries_1.f90
trunk/gcc/testsuite/gfortran.dg/proc_assign_1.f90
trunk/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/intrinsic.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/namelist_4.f90
trunk/gcc/testsuite/gfortran.dg/procedure_lvalue.f90


-- 


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



[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-01-27 Thread paul dot richard dot thomas at cea dot fr


--- Comment #6 from paul dot richard dot thomas at cea dot fr  2006-01-27 
11:04 ---
(In reply to comment #5)
 Confirmed (for now, unless you feel this is an exact dup of bug 18003).

I think that it might well be a duplicate but cannot be sure.

Paul


-- 


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



[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-01-06 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2006-01-06 13:56 ---
Confirmed (for now, unless you feel this is an exact dup of bug 18003).


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2006-01-06 13:56:01
   date||


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




[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-01-04 Thread paul dot richard dot thomas at cea dot fr


--- Comment #3 from paul dot richard dot thomas at cea dot fr  2006-01-04 
14:25 ---
(In reply to comment #2)
 Actually assumed sized is not the full issue, see PR 18003.

You are right about this.  Turn the declaration for a into an explicit
full-array, rather than assumed size.

I have seen, somewhere, a check for the rank of inquiry intrinsics, that uses
the rank calculated from the arguments, if rank 0 is found for the function.  I
believe that the use of the scalarizer for intrinsic bounds is screwing itself
up when tricked into treating the expression as scalarizable.  This is
confirmed by the work-around of taking the lbound out of the actual array list
for bar().

I have taken assumed size out of the summary line.


-- 

paul dot richard dot thomas at cea dot fr changed:

   What|Removed |Added

Summary|LBOUND (assumed-size-array),|LBOUND (array), as actual
   |as actual arg,causes fatal  |arg,causes fatal error.
   |error.  |


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




[Bug fortran/25669] LBOUND (array), as actual arg,causes fatal error.

2006-01-04 Thread paul dot richard dot thomas at cea dot fr


--- Comment #4 from paul dot richard dot thomas at cea dot fr  2006-01-04 
14:26 ---
(In reply to comment #2)
 Actually assumed sized is not the full issue, see PR 18003.

You are right about this.  Turn the declaration for a into an explicit
full-array, rather than assumed size.

I have seen, somewhere, a check for the rank of inquiry intrinsics, that uses
the rank calculated from the arguments, if rank 0 is found for the function.  I
believe that the use of the scalarizer for intrinsic bounds is screwing itself
up when tricked into treating the expression as scalarizable.  This is
confirmed by the work-around of taking the lbound out of the actual array list
for bar().

I have taken assumed size out of the summary line.


-- 


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