public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect.
@ 2011-02-01 10:40 kloedej at knmi dot nl
  2011-02-01 11:04 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: kloedej at knmi dot nl @ 2011-02-01 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: gfortran does not detect that the parameters for
                    passing a partial string to a subroutine are
                    incorrect.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kloedej@knmi.nl


gfortran does not detect that the parameters for passing a partial string to a
subroutine are incorrect.
The example uses s(i) in stead of s(i:j) to pass the string, and this was a
common usage pattern in the old fortran77 days, so this may bother more users.

Sample code:

module teststr
  implicit none
  integer, parameter :: GRH_SIZE = 20, NMAX = 41624
  type strtype
    integer   :: size
    character :: mdr(NMAX)
  end type strtype
contains
  subroutine sub2(string,str_size)
    integer,intent(in)    :: str_size
    character,intent(out) :: string(str_size)
    string(:) = 'a'
  end subroutine sub2
  subroutine sub1(a)
    type(strtype),intent(inout) :: a
    call sub2(a%mdr(GRH_SIZE+1),a%size-GRH_SIZE)
  end subroutine sub1
end module teststr

Command used for compiling:

>gfortran -c minimal_example.F90
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
>

gfortran version used:

>gfortran --version
GNU Fortran (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10)

If the line:
     call sub2(a%mdr(GRH_SIZE+1),a%size-GRH_SIZE)
is replaced by:
     call sub2(a%mdr(GRH_SIZE+1:),a%size-GRH_SIZE)

then the compilation runs without problems.

Expected output was to get a proper error message with the provided sample
code.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
@ 2011-02-01 11:04 ` burnus at gcc dot gnu.org
  2011-02-01 11:33 ` burnus at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-01 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |burnus at gcc dot gnu.org
            Summary|gfortran does not detect    |[4.3/4.4/4.5/4.6
                   |that the parameters for     |Regression] gfortran does
                   |passing a partial string to |not detect that the
                   |a subroutine are incorrect. |parameters for passing a
                   |                            |partial string to a
                   |                            |subroutine are incorrect
      Known to fail|                            |4.4.4, 4.6.0

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-01 11:03:57 UTC ---
ICE with gfortran 4.3 to 4.6; compiled with gfortran 4.1.

Other compilers (NAG, g95, ifort) do not show any compile-time warning/error.

==21718== Invalid read of size 4
==21718==    at 0x4F29A5: compare_actual_formal (interface.c:1689)
==21718==    by 0x4F2D5D: gfc_procedure_use (interface.c:2727)
==21718==    by 0x53A825: resolve_call (resolve.c:3508)

  /* Not an array element.  */
  if (formal->ts.type == BT_CHARACTER
      && (ref == NULL
          || (actual->expr_type == EXPR_VARIABLE
              && (actual->symtree->n.sym->as->type == AS_ASSUMED_SHAPE
                  || actual->symtree->n.sym->attr.pointer))))

The check does not make sense: For "ref->NULL" one cannot assume that it is an
array ref - it could also be character ref or a component ref.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
  2011-02-01 11:04 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
@ 2011-02-01 11:33 ` burnus at gcc dot gnu.org
  2011-02-01 14:54 ` burnus at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-01 11:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-01 11:33:33 UTC ---
A bit unrelated to the reported problem, but I wonder whether the
coarray/coindexed part is already correctly checked for:

"If the actual argument is a coindexed scalar, the corresponding dummy argument
shall be scalar. If the actual argument is a noncoindexed scalar, the
corresponding dummy argument shall be scalar unless the actual argument
is default character, of type character with the C character kind (15.2.2), or
is an element or substring of an element of an array that is not an
assumed-shape, pointer, or polymorphic array." (F2008)

 * * *

Draft patch:

diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 1e5df61..28daf8a 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1672,7 +1672,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
     return 1;

   /* At this point, we are considering a scalar passed to an array.   This
-     is valid (cf. F95 12.4.1.1; F2003 12.4.1.2),
+     is valid (cf. F95 12.4.1.1 and F2008 12.5.2.4; F2003 12.4.1.2),
      - if the actual argument is (a substring of) an element of a
        non-assumed-shape/non-pointer array;
      - (F2003) if the actual argument is of type character.  */
@@ -1686,8 +1686,8 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
   if (formal->ts.type == BT_CHARACTER
       && (ref == NULL
           || (actual->expr_type == EXPR_VARIABLE
-          && (actual->symtree->n.sym->as->type == AS_ASSUMED_SHAPE
-          || actual->symtree->n.sym->attr.pointer))))
+          && (ref->u.ar.as->type == AS_ASSUMED_SHAPE
+          || gfc_expr_attr (actual).pointer))))
     {
       if (where && (gfc_option.allow_std & GFC_STD_F2003) == 0)
     {


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
  2011-02-01 11:04 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
  2011-02-01 11:33 ` burnus at gcc dot gnu.org
@ 2011-02-01 14:54 ` burnus at gcc dot gnu.org
  2011-02-01 15:19 ` burnus at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-01 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-01 14:54:10 UTC ---
(In reply to comment #2)
> Draft patch:
> +          || gfc_expr_attr (actual).pointer))))

That check won't work as "foo(1)" is never a pointer while "foo" might be a
pointer; thus, one has to save the last REF_COMPONENT and handle it manually.

The following check at a few lines later also needs to be modified (both the
AS_ASSUMED and the pointer check).

  if (actual->expr_type == EXPR_VARIABLE && ref
      && (ref->u.ar.as->type == AS_ASSUMED_SHAPE
          || gfc_expr_attr (actual).pointer))

And the check:

  for (ref = actual->ref; ref; ref = ref->next)
    if (ref->type == REF_ARRAY && ref->u.ar.type == AR_ELEMENT
        && ref->u.ar.dimen > 0)
      break;

seems to mishandle  "foo(1)%bar(1)%foo" by looking only at the first
AR_ELEMENT.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (2 preceding siblings ...)
  2011-02-01 14:54 ` burnus at gcc dot gnu.org
@ 2011-02-01 15:19 ` burnus at gcc dot gnu.org
  2011-02-03  5:27 ` pault at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-01 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |4.5.3


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (3 preceding siblings ...)
  2011-02-01 15:19 ` burnus at gcc dot gnu.org
@ 2011-02-03  5:27 ` pault at gcc dot gnu.org
  2011-02-03  7:46 ` burnus at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pault at gcc dot gnu.org @ 2011-02-03  5:27 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.02.03 05:27:37
         AssignedTo|unassigned at gcc dot       |pault at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> 2011-02-03 05:27:37 UTC ---
Created attachment 23230
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23230
Patchfor the problem

The attached corrects the ICE, retains the existing functionality and extends
it to include array components.  I am guessing but I suppose ultimate pointer
components should be included too?  This raises a point, however. Relative to
the message, the error seems to do a lot more :-)  I feel a lunchtime peruse of
the F2003 standard coming on.

Cheers

Paul


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (4 preceding siblings ...)
  2011-02-03  5:27 ` pault at gcc dot gnu.org
@ 2011-02-03  7:46 ` burnus at gcc dot gnu.org
  2011-02-10 15:14 ` burnus at gcc dot gnu.org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-03  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-03 07:46:17 UTC ---
(In reply to comment #4)
> I am guessing but I suppose ultimate pointer components should be included
> too?

Yes, however, "gfc_expr_attr (actual).pointer" does not work as "foo(1)" is
never a pointer (even if "foo" is one). Thus, one needs to do something like:
  pointer = sym->n.sym->attr.pointer
and update it every time one accesses a component ref. (I have not thought
about pointer-returning functions, but one should not confuse them with
proc-pointer functions.)


> This raises a point, however. Relative to the message, the error seems to do a
> lot more :-)  I feel a lunchtime peruse of the F2003 standard coming on.

I have in my incomplete draft patch also the following bits, which should be
included in the final patch:

-     is valid (cf. F95 12.4.1.1; F2003 12.4.1.2),
+     is valid (cf. F95 12.4.1.1, F2003 12.4.1.2, F2008 12.5.2.4),

and

-       gfc_error ("Element of assumed-shaped array passed to dummy "
-                  "argument '%s' at %L", formal->name, &actual->where);
+       gfc_error ("Element of assumed-shaped or pointer array passed to "
+                  "dummy argument '%s' at %L", formal->name, &actual->where);


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (5 preceding siblings ...)
  2011-02-03  7:46 ` burnus at gcc dot gnu.org
@ 2011-02-10 15:14 ` burnus at gcc dot gnu.org
  2011-02-10 15:21 ` burnus at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-10 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23230|0                           |1
        is obsolete|                            |
             Status|NEW                         |ASSIGNED
         AssignedTo|pault at gcc dot gnu.org    |burnus at gcc dot gnu.org

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-10 15:10:35 UTC ---
Created attachment 23295
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23295
Updated patch with test case

Full patch, currently regtesting; needs a cross check and can then be
submitted.

Polymorphic test case (disabled) fails due to an earlier ICE, cf. PR 47680.

F2008 quote ("12.5.2.4 Ordinary dummy variables"):
"If the actual argument is a noncoindexed scalar, the corresponding dummy
argument shall be scalar unless the actual argument is default character, of
type character with the C character kind (15.2.2), or is an element or
substring of an element of an array that is not an assumed-shape, pointer, or
polymorphic array."


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (6 preceding siblings ...)
  2011-02-10 15:14 ` burnus at gcc dot gnu.org
@ 2011-02-10 15:21 ` burnus at gcc dot gnu.org
  2011-02-12  1:38 ` burnus at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-10 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-10 15:18:09 UTC ---
(In reply to comment #0)
> The example uses s(i) in stead of s(i:j) to pass the string, and this was a
> common usage pattern in the old fortran77 days, so this may bother more users.

Side remark: While this usage is common in Fortran 77 (or rather Fortran IV and
Fortran 66), it is not commonly found together with derived types.

 * * *

(In reply to comment #6)
> Full patch, currently regtesting; needs a cross check and can then be
> submitted.

Fails for argument_checking_11.f90, argument_checking_12.f90,
argument_checking_13.f90, and argument_checking_14.f90 ... to be fixed later.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (7 preceding siblings ...)
  2011-02-10 15:21 ` burnus at gcc dot gnu.org
@ 2011-02-12  1:38 ` burnus at gcc dot gnu.org
  2011-02-12 19:24 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-12  1:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-11 23:27:35 UTC ---
Submitted patch (with some modifications):
http://gcc.gnu.org/ml/fortran/2011-02/msg00087.html


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (8 preceding siblings ...)
  2011-02-12  1:38 ` burnus at gcc dot gnu.org
@ 2011-02-12 19:24 ` dominiq at lps dot ens.fr
  2011-02-12 19:28 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-02-12 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-02-12 19:07:43 UTC ---
The patch in comment #8 fixes this pr but also pr45244.


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (9 preceding siblings ...)
  2011-02-12 19:24 ` dominiq at lps dot ens.fr
@ 2011-02-12 19:28 ` burnus at gcc dot gnu.org
  2011-02-13 10:14 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-12 19:28 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Eric.Zurcher at csiro dot
                   |                            |au

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-12 19:28:14 UTC ---
*** Bug 45244 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (10 preceding siblings ...)
  2011-02-12 19:28 ` burnus at gcc dot gnu.org
@ 2011-02-13 10:14 ` burnus at gcc dot gnu.org
  2011-02-13 19:30 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-13 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-13 10:11:44 UTC ---
(In reply to comment #8)
> Submitted patch (with some modifications):
> http://gcc.gnu.org/ml/fortran/2011-02/msg00087.html

Mikael pointed out that I have probably misread the standard with regards to
restrictions for pointer character actual arguments.

As the text is a bit confusing (first part seems to allow all scalar character
actual arguments, second part implies the restrictions also apply to elements
of character arrays), I have asked at J3:

http://j3-fortran.org/pipermail/j3/2011-February/004191.html


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (11 preceding siblings ...)
  2011-02-13 10:14 ` burnus at gcc dot gnu.org
@ 2011-02-13 19:30 ` burnus at gcc dot gnu.org
  2011-02-13 21:01 ` [Bug fortran/47569] [4.3/4.4/4.5 " burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-13 19:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-13 19:26:27 UTC ---
Author: burnus
Date: Sun Feb 13 19:26:24 2011
New Revision: 170110

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170110
Log:
2011-02-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47569
        * interface.c (compare_parameter): Avoid ICE with
        character components.

2011-02-13  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/argument_checking_13.f90: Update dg-error.
        * gfortran.dg/argument_checking_17.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/argument_checking_17.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/interface.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/argument_checking_13.f90


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (12 preceding siblings ...)
  2011-02-13 19:30 ` burnus at gcc dot gnu.org
@ 2011-02-13 21:01 ` burnus at gcc dot gnu.org
  2011-02-14  8:04 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-13 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.3                       |4.4.6
            Summary|[4.3/4.4/4.5/4.6            |[4.3/4.4/4.5 Regression]
                   |Regression] gfortran does   |gfortran does not detect
                   |not detect that the         |that the parameters for
                   |parameters for passing a    |passing a partial string to
                   |partial string to a         |a subroutine are incorrect
                   |subroutine are incorrect    |


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (13 preceding siblings ...)
  2011-02-13 21:01 ` [Bug fortran/47569] [4.3/4.4/4.5 " burnus at gcc dot gnu.org
@ 2011-02-14  8:04 ` burnus at gcc dot gnu.org
  2011-02-14 14:07 ` [Bug fortran/47569] [4.3/4.4 " burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-14  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-14 06:38:48 UTC ---
Author: burnus
Date: Mon Feb 14 06:38:44 2011
New Revision: 170123

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170123
Log:
2011-02-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47569
        * interface.c (compare_parameter): Avoid ICE with
        character components.

2011-02-14  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/argument_checking_13.f90: Update dg-error.
        * gfortran.dg/argument_checking_17.f90: New.


Added:
    branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/argument_checking_17.f90
Modified:
    branches/gcc-4_5-branch/gcc/fortran/ChangeLog
    branches/gcc-4_5-branch/gcc/fortran/interface.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/argument_checking_13.f90


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (14 preceding siblings ...)
  2011-02-14  8:04 ` burnus at gcc dot gnu.org
@ 2011-02-14 14:07 ` burnus at gcc dot gnu.org
  2011-02-14 14:12 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 " burnus at gcc dot gnu.org
  2011-02-14 14:13 ` kloedej at knmi dot nl
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-14 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-14 14:05:58 UTC ---
Author: burnus
Date: Mon Feb 14 14:05:52 2011
New Revision: 170129

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170129
Log:
2011-02-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47569
        * interface.c (compare_parameter): Avoid ICE with
        character components.

2011-02-14  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/argument_checking_13.f90: Update dg-error.
        * gfortran.dg/argument_checking_17.f90: New.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/argument_checking_17.f90
Modified:
    branches/gcc-4_4-branch/gcc/fortran/ChangeLog
    branches/gcc-4_4-branch/gcc/fortran/interface.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/argument_checking_13.f90


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (15 preceding siblings ...)
  2011-02-14 14:07 ` [Bug fortran/47569] [4.3/4.4 " burnus at gcc dot gnu.org
@ 2011-02-14 14:12 ` burnus at gcc dot gnu.org
  2011-02-14 14:13 ` kloedej at knmi dot nl
  17 siblings, 0 replies; 19+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-14 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.3/4.4 Regression]        |[4.3/4.4/4.5/4.6
                   |gfortran does not detect    |Regression] gfortran does
                   |that the parameters for     |not detect that the
                   |passing a partial string to |parameters for passing a
                   |a subroutine are incorrect  |partial string to a
                   |                            |subroutine are incorrect

--- Comment #15 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-14 14:07:59 UTC ---
FIXED on the 4.4 and 4.5 branches and on the 4.6 trunk.

Thanks Jos and Eric for the reports!


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect
  2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
                   ` (16 preceding siblings ...)
  2011-02-14 14:12 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 " burnus at gcc dot gnu.org
@ 2011-02-14 14:13 ` kloedej at knmi dot nl
  17 siblings, 0 replies; 19+ messages in thread
From: kloedej at knmi dot nl @ 2011-02-14 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jos de Kloe <kloedej at knmi dot nl> 2011-02-14 14:12:15 UTC ---
(In reply to comment #15)
> FIXED on the 4.4 and 4.5 branches and on the 4.6 trunk.
> 
> Thanks Jos and Eric for the reports!

Hi Tobias,

thanks a lot for looking into this issue and fixing it!


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-02-14 14:12 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 10:40 [Bug fortran/47569] New: gfortran does not detect that the parameters for passing a partial string to a subroutine are incorrect kloedej at knmi dot nl
2011-02-01 11:04 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 Regression] " burnus at gcc dot gnu.org
2011-02-01 11:33 ` burnus at gcc dot gnu.org
2011-02-01 14:54 ` burnus at gcc dot gnu.org
2011-02-01 15:19 ` burnus at gcc dot gnu.org
2011-02-03  5:27 ` pault at gcc dot gnu.org
2011-02-03  7:46 ` burnus at gcc dot gnu.org
2011-02-10 15:14 ` burnus at gcc dot gnu.org
2011-02-10 15:21 ` burnus at gcc dot gnu.org
2011-02-12  1:38 ` burnus at gcc dot gnu.org
2011-02-12 19:24 ` dominiq at lps dot ens.fr
2011-02-12 19:28 ` burnus at gcc dot gnu.org
2011-02-13 10:14 ` burnus at gcc dot gnu.org
2011-02-13 19:30 ` burnus at gcc dot gnu.org
2011-02-13 21:01 ` [Bug fortran/47569] [4.3/4.4/4.5 " burnus at gcc dot gnu.org
2011-02-14  8:04 ` burnus at gcc dot gnu.org
2011-02-14 14:07 ` [Bug fortran/47569] [4.3/4.4 " burnus at gcc dot gnu.org
2011-02-14 14:12 ` [Bug fortran/47569] [4.3/4.4/4.5/4.6 " burnus at gcc dot gnu.org
2011-02-14 14:13 ` kloedej at knmi dot nl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).