[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-07-12 Thread pault at gcc dot gnu dot org


--- Comment #9 from pault at gcc dot gnu dot org  2006-07-13 05:07 ---
Subject: Bug 28174

Author: pault
Date: Thu Jul 13 05:07:35 2006
New Revision: 115410

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=115410
Log:
2006-07-13  Paul Thomas  [EMAIL PROTECTED]

PR fortran/28174
* trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
that intent is INOUT (fixes regression).

PR fortran/25097
* check.c (check_present): The only permitted reference is a
full array reference.

PR fortran/20903
* decl.c (variable_decl): Add error if a derived type is not
from the current namespace if the namespace is an interface
body.

2006-07-13  Paul Thomas  [EMAIL PROTECTED]

PR fortran/25097
* gfortran.dg/present_1.f90: New test.

PR fortran/20903
* gfortran.dg/interface_derived_type_1.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
trunk/gcc/testsuite/gfortran.dg/present_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-07-06 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2006-07-06 15:35 ---
Subject: Bug 28174

Author: pault
Date: Thu Jul  6 15:35:24 2006
New Revision: 115222

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=115222
Log:
2006-07-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/28174
* trans-array.c (gfc_conv_expr_descriptor): When building temp,
ensure that the substring reference uses a new charlen.
* trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
the argument list, lift the treatment of missing string lengths
from the above and implement the use of the intent.
(gfc_conv_function_call): Add the extra argument to the call to
the above.

PR fortran/28167
* trans-array.c (get_array_ctor_var_strlen): Treat a constant
substring reference.
* array.c (gfc_resolve_character_array_constructor): Remove 
static attribute and add the gfc_ prefix, make use of element
charlens for the expression and pick up constant string lengths
for expressions that are not themselves constant.
* gfortran.h : resolve_character_array_constructor prototype
added.
* resolve.c (gfc_resolve_expr): Call resolve_character_array_
constructor again after expanding the constructor, to ensure
that the character length is passed to the expression.

2006-07-06  Paul Thomas  [EMAIL PROTECTED]

PR fortran/28174
* gfortran.dg/actual_array_substr_2.f90: New test.

PR fortran/28167
* gfortran.dg/actual_array_constructor_2.f90: New test.


Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/array.c
branches/gcc-4_1-branch/gcc/fortran/gfortran.h
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-expr.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-07-06 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2006-07-06 15:37 ---
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=28174



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

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


--- Comment #5 from pault at gcc dot gnu dot org  2006-07-04 20:16 ---
Subject: Bug 28174

Author: pault
Date: Tue Jul  4 20:15:52 2006
New Revision: 115182

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

PR fortran/28174
* trans-array.c (gfc_conv_expr_descriptor): When building temp,
ensure that the substring reference uses a new charlen.
* trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
the argument list, lift the treatment of missing string lengths
from the above and implement the use of the intent.
(gfc_conv_function_call): Add the extra argument to the call to
the above.

PR fortran/28167
* trans-array.c (get_array_ctor_var_strlen): Treat a constant
substring reference.
* array.c (gfc_resolve_character_array_constructor): Remove 
static attribute and add the gfc_ prefix, make use of element
charlens for the expression and pick up constant string lengths
for expressions that are not themselves constant.
* gfortran.h : resolve_character_array_constructor prototype
added.
* resolve.c (gfc_resolve_expr): Call resolve_character_array_
constructor again after expanding the constructor, to ensure
that the character length is passed to the expression.

2006-07-04  Paul Thomas  [EMAIL PROTECTED]

PR fortran/28174
* gfortran.dg/actual_array_substr_2.f90: New test.

PR fortran/28167
* gfortran.dg/actual_array_constructor_2.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/actual_array_constructor_2.f90
trunk/gcc/testsuite/gfortran.dg/actual_array_substr_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/array.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c


-- 


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

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


--- Comment #6 from pault at gcc dot gnu dot org  2006-07-04 20:36 ---
Subject: Bug 28174

Author: pault
Date: Tue Jul  4 20:36:15 2006
New Revision: 115187

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

PR fortran/28174
* gfortran.dg/actual_array_substr_2.f90: New test.

PR fortran/28167
* gfortran.dg/actual_array_constructor_2.f90: New test.


Modified:
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-06-29 Thread patchapp at dberlin dot org


--- Comment #3 from patchapp at dberlin dot org  2006-06-29 22:05 ---
Subject: Bug number PR28174

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01509.html


-- 


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-06-29 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2006-06-29 22:30 ---
Does the bug not get confirmed when somebody is assigned to it?

Paul


-- 

pault 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-06-29 22:30:05
   date||


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-06-27 Thread pault at gcc dot gnu dot org


--- Comment #2 from pault at gcc dot gnu dot org  2006-06-27 17:47 ---
As I said to you in my email, this represents a new problem, which is exposed
by the previous fix.  I should have noticed that this was happening but, at
least it doesn't segfault any more!

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |


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



[Bug fortran/28174] Corruption of multiple character arrays when passing array sections

2006-06-26 Thread anlauf at gmx dot de


--- Comment #1 from anlauf at gmx dot de  2006-06-26 20:58 ---
Created an attachment (id=11759)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11759action=view)
Testcase

Output of testcase:

 Before foo:
 a(1)=abc def ghij
 a(2)=klm nop qrst
 b(1)=abc def ghij
 b(2)=klm nop qrst

 In foo: c(1)=f ghi

 After foo:
 a(1)=abc d
 a(2)=klm n
 b(1)=abc d
 b(2)=klm n
 Bug: array a corrupted in subroutine call!
 Bug: array b corrupted in subroutine call!


-- 


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