public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
  2021-06-01  8:11 ` rguenth at gcc dot gnu.org
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.3                         |9.4

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays jakub at gcc dot gnu.org
@ 2021-06-01  8:11 ` rguenth at gcc dot gnu.org
  2022-05-27  8:19 ` rguenth at gcc dot gnu.org
                   ` (30 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays jakub at gcc dot gnu.org
  2021-06-01  8:11 ` rguenth at gcc dot gnu.org
@ 2022-05-27  8:19 ` rguenth at gcc dot gnu.org
  2023-06-09 19:48 ` anlauf at gcc dot gnu.org
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  8:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |---

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-05-27  8:19 ` rguenth at gcc dot gnu.org
@ 2023-06-09 19:48 ` anlauf at gcc dot gnu.org
  2023-06-09 19:48 ` anlauf at gcc dot gnu.org
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-09 19:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #8 from anlauf at gcc dot gnu.org ---
Created attachment 55294
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55294&action=edit
WIP patch

The attached WIP patch fixes the issue for optional arguments of intrinsic type
except CHARACTER, but does not yet handle derived types.  Regtests OK.

Enabling derived types does not work when they occur in an array constructor,
and the code would ICE on empty constructors of derived type.

I haven't understood yet how (and why) temporaries are generated for
procedure arguments even when it is known at compile-time that these have
size zero.  I'd appreciate input from others.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-06-09 19:48 ` anlauf at gcc dot gnu.org
@ 2023-06-09 19:48 ` anlauf at gcc dot gnu.org
  2023-06-10 10:27 ` mikael at gcc dot gnu.org
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-09 19:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|anlauf at gmx dot de               |
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2023-06-09 19:48 ` anlauf at gcc dot gnu.org
@ 2023-06-10 10:27 ` mikael at gcc dot gnu.org
  2023-06-10 10:30 ` mikael at gcc dot gnu.org
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 10:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #9 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #8)
> 
> I haven't understood yet how (and why) temporaries are generated for
> procedure arguments even when it is known at compile-time that these have
> size zero.  I'd appreciate input from others.

I think temporaries in this case come from the scalarizer, which is known to
generate superfluous temporaries with array constructors.  See
trans_array_constructor.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-06-10 10:27 ` mikael at gcc dot gnu.org
@ 2023-06-10 10:30 ` mikael at gcc dot gnu.org
  2023-06-10 10:40 ` mikael at gcc dot gnu.org
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 10:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> ---
Created attachment 55296
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55296&action=edit
Another way to fix this problem

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-06-10 10:30 ` mikael at gcc dot gnu.org
@ 2023-06-10 10:40 ` mikael at gcc dot gnu.org
  2023-06-10 11:45 ` mikael at gcc dot gnu.org
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #11 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #9)
> (In reply to anlauf from comment #8)
> > 
> > I haven't understood yet how (and why) temporaries are generated for
> > procedure arguments even when it is known at compile-time that these have
> > size zero.  I'd appreciate input from others.
> 
> See trans_array_constructor.

Actually, your patch is already touching that function.
I'm afraid this is an area nobody (well, nobody but you) dares touching.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2023-06-10 10:40 ` mikael at gcc dot gnu.org
@ 2023-06-10 11:45 ` mikael at gcc dot gnu.org
  2023-06-10 13:21 ` anlauf at gcc dot gnu.org
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 11:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #12 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #8) 
> Enabling derived types does not work when they occur in an array constructor,
> and the code would ICE on empty constructors of derived type.
> 

Looking at the code, I couldn't foresee where the ICE would happen, so I tried
it myself.
I see no ICE here.

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 04b5e30b96a..4fd3fb65a54 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -2941,10 +2941,6 @@ trans_array_constructor (gfc_ss * ss, locus * where)
         from constructor only for meaningful shape.  */
       bool zero_sized = zero_sized_array_p (expr);

-      /* FIXME: constant array constructors for DT have some issues...  */
-      if (expr->ts.type == BT_DERIVED || expr->ts.type == BT_CLASS)
-       zero_sized = false;
-
       if (!zero_sized)
        nelem = gfc_constant_array_constructor_p (c);


program test
  implicit none
  type :: t
    integer :: c
  end type t
  integer :: m(0)
  integer, allocatable :: n(:)
  call i
  call i(m)
  call i(n)
  allocate (n(0))
  call i(n)
  call i([integer::])       ! expect "optional argument present: T"
  call i([1])
  call j([t::])
contains
  subroutine i(str)
    integer, dimension(:), optional, intent(in) :: str
    write(6,*) 'optional argument present:', present(str)
  end subroutine i
  subroutine j(str)
    type(t), dimension(:), optional, intent(in) :: str
    write(6,*) 'optional argument present:', present(str)
  end subroutine j
end program

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2023-06-10 11:45 ` mikael at gcc dot gnu.org
@ 2023-06-10 13:21 ` anlauf at gcc dot gnu.org
  2023-06-10 13:25 ` anlauf at gcc dot gnu.org
                   ` (22 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-10 13:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #13 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #12)
> (In reply to anlauf from comment #8) 
> > Enabling derived types does not work when they occur in an array constructor,
> > and the code would ICE on empty constructors of derived type.
> > 
> 
> Looking at the code, I couldn't foresee where the ICE would happen, so I
> tried it myself.
> I see no ICE here.

I got an ICE with pointer_check_14.f90 and realloc_on_assign_18.f90
which have an empty DT with no component.

I guess it's all about zeros...

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2023-06-10 13:21 ` anlauf at gcc dot gnu.org
@ 2023-06-10 13:25 ` anlauf at gcc dot gnu.org
  2023-06-10 19:27 ` anlauf at gcc dot gnu.org
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-10 13:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #14 from anlauf at gcc dot gnu.org ---
Created attachment 55297
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55297&action=edit
Draft testcase

This testcase tries to probe many different paths for real array ctors.
I have similar testcases for character and DT which need more work.

Will look at your approach later.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2023-06-10 13:25 ` anlauf at gcc dot gnu.org
@ 2023-06-10 19:27 ` anlauf at gcc dot gnu.org
  2023-06-10 19:55 ` mikael at gcc dot gnu.org
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-10 19:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #15 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #14)
> Will look at your approach later.

For the draft testcase, your patch seems to handle the explicit temporaries,
but there is a runtime error (memory corruption?) for some of the cases
with array ctors.

Your patch also seems to fix (at first glance) the character case as well
as type, so this appears to be the right direction.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2023-06-10 19:27 ` anlauf at gcc dot gnu.org
@ 2023-06-10 19:55 ` mikael at gcc dot gnu.org
  2023-06-10 20:07 ` mikael at gcc dot gnu.org
                   ` (19 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 19:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #16 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #13)
> (In reply to Mikael Morin from comment #12)
> > (In reply to anlauf from comment #8) 
> > > Enabling derived types does not work when they occur in an array constructor,
> > > and the code would ICE on empty constructors of derived type.
> > > 
> > 
> > Looking at the code, I couldn't foresee where the ICE would happen, so I
> > tried it myself.
> > I see no ICE here.
> 
> I got an ICE with pointer_check_14.f90 and realloc_on_assign_18.f90
> which have an empty DT with no component.
> 
They work here.  I must be doing something stupidly wrong.
My compiler is a bit outdated, but not that much:
GNU Fortran (GCC) 14.0.0 20230529 (experimental)

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2023-06-10 19:55 ` mikael at gcc dot gnu.org
@ 2023-06-10 20:07 ` mikael at gcc dot gnu.org
  2023-06-10 20:17 ` mikael at gcc dot gnu.org
                   ` (18 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 20:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #17 from Mikael Morin <mikael at gcc dot gnu.org> ---
Looking further at the implementation of gfc_trans_allocate_array_storage, the
size vs elem_size dance can be removed from my patch, as size is almost unused
in the onstack case.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2023-06-10 20:07 ` mikael at gcc dot gnu.org
@ 2023-06-10 20:17 ` mikael at gcc dot gnu.org
  2023-06-10 20:33 ` mikael at gcc dot gnu.org
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 20:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55296|0                           |1
        is obsolete|                            |

--- Comment #18 from Mikael Morin <mikael at gcc dot gnu.org> ---
Created attachment 55300
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55300&action=edit
Alternative patch v2

(In reply to Mikael Morin from comment #17)
> Looking further at the implementation of gfc_trans_allocate_array_storage,
> the size vs elem_size dance can be removed from my patch, as size is almost
> unused in the onstack case.

Updated patch attached.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2023-06-10 20:17 ` mikael at gcc dot gnu.org
@ 2023-06-10 20:33 ` mikael at gcc dot gnu.org
  2023-06-11 20:44 ` anlauf at gcc dot gnu.org
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-10 20:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #19 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #15)
> 
> Your patch also seems to fix (at first glance) the character case as well
> as type, so this appears to be the right direction.

Yet, your patch identifies a bug in trans_array_constructor.
Not sure whether that bug can also be visible in a different case.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2023-06-10 20:33 ` mikael at gcc dot gnu.org
@ 2023-06-11 20:44 ` anlauf at gcc dot gnu.org
  2023-06-12  7:13 ` mikael at gcc dot gnu.org
                   ` (15 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-11 20:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #20 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #18)
> Created attachment 55300 [details]
> Alternative patch v2

This patch fails for me on several occasions including the testsuite.
I guess the logic was intended as follows:

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index e1c75e9fe02..ebadda20004 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -1117,7 +1117,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre,
stmtblock_t * post,

   desc = info->descriptor;
   info->offset = gfc_index_zero_node;
-  if (size == NULL_TREE || integer_zerop (size))
+  if (size == NULL_TREE)
     {
       /* A callee allocated array.  */
       gfc_conv_descriptor_data_set (pre, desc, null_pointer_node);
@@ -1129,6 +1129,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre,
stmtblock_t * post,
       onstack = !dynamic && initial == NULL_TREE
                         && (flag_stack_arrays
                             || gfc_can_put_var_on_stack (size));
+      onstack = onstack && !integer_zerop (size);

       if (onstack)
        {


This seems to work on the present cases and regtests almost cleanly, with
the only exception being gfortran.dg/pr69955.f90, which needs an adjustment
of the scan-tree-dump pattern due to an additional __builtin_malloc.

I am beginning to think that there are multiple issues exhibited here: a
wrong-code issue, which is fixed by the above, and a missed-optimization,
which I tried to address with my initial patch.

If the above patch turns out to fix the wrong-code issue safely, I would
like to prepare it for mainline, and if it survives there for some time,
consider a backport to 13-branch in time for 13.2 release.

The missed optimization with superfluous temporaries could then be split
off to a separate PR and addressed only for future (14+) branches.

I'll prepare additional testcases for character and type and see if the above
patch is sufficient.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2023-06-11 20:44 ` anlauf at gcc dot gnu.org
@ 2023-06-12  7:13 ` mikael at gcc dot gnu.org
  2023-06-12  7:39 ` mikael at gcc dot gnu.org
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12  7:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #21 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #20)
> 
> This patch fails for me on several occasions including the testsuite.
> I guess the logic was intended as follows:
> 
Well, not really, it seems wasteful to use the heap for something known to be
useless anyway.
But I agree that your variant is probably safer.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2023-06-12  7:13 ` mikael at gcc dot gnu.org
@ 2023-06-12  7:39 ` mikael at gcc dot gnu.org
  2023-06-12  7:56 ` mikael at gcc dot gnu.org
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12  7:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #22 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #20)
> (In reply to Mikael Morin from comment #18)
> > Created attachment 55300 [details]
> > Alternative patch v2
> 
> This patch fails for me on several occasions including the testsuite.

Obviously the stack shouldn't be used if the array can grow dynamically
(dynamic == true).
So the patch could be simplified further:

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 1c7ea900ea1..cc1dddbeb33 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -1117,7 +1117,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre,
stmtblock_t * post,

   desc = info->descriptor;
   info->offset = gfc_index_zero_node;
-  if (size == NULL_TREE || integer_zerop (size))
+  if (size == NULL_TREE)
     {
       /* A callee allocated array.  */
       gfc_conv_descriptor_data_set (pre, desc, null_pointer_node);

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2023-06-12  7:39 ` mikael at gcc dot gnu.org
@ 2023-06-12  7:56 ` mikael at gcc dot gnu.org
  2023-06-12  8:17 ` mikael at gcc dot gnu.org
                   ` (12 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12  7:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #23 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #22)
> 
> diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
> index 1c7ea900ea1..cc1dddbeb33 100644
> --- a/gcc/fortran/trans-array.cc
> +++ b/gcc/fortran/trans-array.cc
> @@ -1117,7 +1117,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre,
> stmtblock_t * post,
>  
>    desc = info->descriptor;
>    info->offset = gfc_index_zero_node;
> -  if (size == NULL_TREE || integer_zerop (size))
> +  if (size == NULL_TREE)
>      {
>        /* A callee allocated array.  */
>        gfc_conv_descriptor_data_set (pre, desc, null_pointer_node);

This regresses on pr108065.f90 (that's a few extra analyzer warnings),
and on pr69955.f90 (that's one extra __builtin_malloc).

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2023-06-12  7:56 ` mikael at gcc dot gnu.org
@ 2023-06-12  8:17 ` mikael at gcc dot gnu.org
  2023-06-12 10:38 ` mikael at gcc dot gnu.org
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12  8:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #24 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #23)
> 
> This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> and on pr69955.f90 (that's one extra __builtin_malloc).

This removes the regressions.  Not fully retested again.

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 1c7ea900ea1..7ae7eacca0b 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -1117,7 +1117,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre,
stmtblock_t * post,

   desc = info->descriptor;
   info->offset = gfc_index_zero_node;
-  if (size == NULL_TREE || integer_zerop (size))
+  if (size == NULL_TREE || (dynamic && integer_zerop (size)))
     {
       /* A callee allocated array.  */
       gfc_conv_descriptor_data_set (pre, desc, null_pointer_node);

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (20 preceding siblings ...)
  2023-06-12  8:17 ` mikael at gcc dot gnu.org
@ 2023-06-12 10:38 ` mikael at gcc dot gnu.org
  2023-06-12 19:42 ` anlauf at gcc dot gnu.org
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12 10:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #25 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #24)
> (In reply to Mikael Morin from comment #23)
> > 
> > This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> > and on pr69955.f90 (that's one extra __builtin_malloc).
> 
> This removes the regressions.  Not fully retested again.
> 
Comment #23 is probably the more correct one.
Comment #24 works because of the double temporary.  Even if the first temporary
has NULL data component, the second one uses malloc unconditionally to set
data, and the argument is seen as present.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (21 preceding siblings ...)
  2023-06-12 10:38 ` mikael at gcc dot gnu.org
@ 2023-06-12 19:42 ` anlauf at gcc dot gnu.org
  2023-06-12 19:47 ` anlauf at gcc dot gnu.org
                   ` (9 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-12 19:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55297|0                           |1
        is obsolete|                            |

--- Comment #26 from anlauf at gcc dot gnu.org ---
Created attachment 55314
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55314&action=edit
Revised/extended testcase

Testcase extended to check more code variations for intrinsic non-character
types and for empty derived type.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (22 preceding siblings ...)
  2023-06-12 19:42 ` anlauf at gcc dot gnu.org
@ 2023-06-12 19:47 ` anlauf at gcc dot gnu.org
  2023-06-12 20:16 ` mikael at gcc dot gnu.org
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-12 19:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #27 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #25)
> (In reply to Mikael Morin from comment #24)
> > (In reply to Mikael Morin from comment #23)
> > > 
> > > This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> > > and on pr69955.f90 (that's one extra __builtin_malloc).
> > 
> > This removes the regressions.  Not fully retested again.
> > 
> Comment #23 is probably the more correct one.
> Comment #24 works because of the double temporary.  Even if the first
> temporary has NULL data component, the second one uses malloc
> unconditionally to set data, and the argument is seen as present.

Are you sure that you haven't mixed up those two?

When trying with my extended testcase, and looking at the tree dump,
I see a double temporary for the call

    call i ([real:: y])

where the data pointer to the first allocation is clobbered later.
So I would rather go with the version from comment #24.

The said line is actually very old code ... ;-)

If you don't object, I'll package the patch with testcases and submit.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (23 preceding siblings ...)
  2023-06-12 19:47 ` anlauf at gcc dot gnu.org
@ 2023-06-12 20:16 ` mikael at gcc dot gnu.org
  2023-06-12 20:32 ` anlauf at gcc dot gnu.org
                   ` (7 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12 20:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #28 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #27)
> (In reply to Mikael Morin from comment #25)
> > (In reply to Mikael Morin from comment #24)
> > > (In reply to Mikael Morin from comment #23)
> > > > 
> > > > This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> > > > and on pr69955.f90 (that's one extra __builtin_malloc).
> > > 
> > > This removes the regressions.  Not fully retested again.
> > > 
> > Comment #23 is probably the more correct one.
> > Comment #24 works because of the double temporary.  Even if the first
> > temporary has NULL data component, the second one uses malloc
> > unconditionally to set data, and the argument is seen as present.
> 
> Are you sure that you haven't mixed up those two?
> 
> When trying with my extended testcase, and looking at the tree dump,
> I see a double temporary for the call
> 
>     call i ([real:: y])
> 
> where the data pointer to the first allocation is clobbered later.
> So I would rather go with the version from comment #24.
> 
Let's rephrase:
When (or rather if) we manage to remove the double temporary, we'll regress
with comment #24, not with comment #23.
The reallocation remains by the way, it's only pushed one step away.
Try this for example:

    call i([real:: y, y])


> If you don't object, I'll package the patch with testcases and submit.

No problem, I think we are safe with the second temporary.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (24 preceding siblings ...)
  2023-06-12 20:16 ` mikael at gcc dot gnu.org
@ 2023-06-12 20:32 ` anlauf at gcc dot gnu.org
  2023-06-12 20:51 ` mikael at gcc dot gnu.org
                   ` (6 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-12 20:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #29 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #28)
> (In reply to anlauf from comment #27)
> > (In reply to Mikael Morin from comment #25)
> > > (In reply to Mikael Morin from comment #24)
> > > > (In reply to Mikael Morin from comment #23)
> > > > > 
> > > > > This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> > > > > and on pr69955.f90 (that's one extra __builtin_malloc).
> > > > 
> > > > This removes the regressions.  Not fully retested again.
> > > > 
> > > Comment #23 is probably the more correct one.
> > > Comment #24 works because of the double temporary.  Even if the first
> > > temporary has NULL data component, the second one uses malloc
> > > unconditionally to set data, and the argument is seen as present.
> > 
> > Are you sure that you haven't mixed up those two?
> > 
> > When trying with my extended testcase, and looking at the tree dump,
> > I see a double temporary for the call
> > 
> >     call i ([real:: y])
> > 
> > where the data pointer to the first allocation is clobbered later.
> > So I would rather go with the version from comment #24.
> > 
> Let's rephrase:
> When (or rather if) we manage to remove the double temporary, we'll regress
> with comment #24, not with comment #23.
> The reallocation remains by the way, it's only pushed one step away.
> Try this for example:
> 
>     call i([real:: y, y])

I do see the reallocation, but in the case of the patch in #24 it is a
realloc of a NULL, which is well-defined nowadays.

But I do not see a regression.  On the contrary, every else seems unchanged.

>  
> > If you don't object, I'll package the patch with testcases and submit.
> 
> No problem, I think we are safe with the second temporary.

Besides the issue with one or two temporaries, is there anything else?

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (25 preceding siblings ...)
  2023-06-12 20:32 ` anlauf at gcc dot gnu.org
@ 2023-06-12 20:51 ` mikael at gcc dot gnu.org
  2023-06-12 21:00 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: mikael at gcc dot gnu.org @ 2023-06-12 20:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #30 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to anlauf from comment #29)
> (In reply to Mikael Morin from comment #28)
> > (In reply to anlauf from comment #27)
> > > (In reply to Mikael Morin from comment #25)
> > > > (In reply to Mikael Morin from comment #24)
> > > > > (In reply to Mikael Morin from comment #23)
> > > > > > 
> > > > > > This regresses on pr108065.f90 (that's a few extra analyzer warnings),
> > > > > > and on pr69955.f90 (that's one extra __builtin_malloc).
> > > > > 
> > > > > This removes the regressions.  Not fully retested again.
> > > > > 
> > > > Comment #23 is probably the more correct one.
> > > > Comment #24 works because of the double temporary.  Even if the first
> > > > temporary has NULL data component, the second one uses malloc
> > > > unconditionally to set data, and the argument is seen as present.
> > > 
> > > Are you sure that you haven't mixed up those two?
> > > 
> > > When trying with my extended testcase, and looking at the tree dump,
> > > I see a double temporary for the call
> > > 
> > >     call i ([real:: y])
> > > 
> > > where the data pointer to the first allocation is clobbered later.
> > > So I would rather go with the version from comment #24.
> > > 
> > Let's rephrase:
> > When (or rather if) we manage to remove the double temporary, we'll regress
> > with comment #24, not with comment #23.
> > The reallocation remains by the way, it's only pushed one step away.
> > Try this for example:
> > 
> >     call i([real:: y, y])
> 
> I do see the reallocation, but in the case of the patch in #24 it is a
> realloc of a NULL, which is well-defined nowadays.
> 
> But I do not see a regression.  On the contrary, every else seems unchanged.
> 
> >  
> > > If you don't object, I'll package the patch with testcases and submit.
> > 
> > No problem, I think we are safe with the second temporary.
> 
> Besides the issue with one or two temporaries, is there anything else?

Now that I think again, I'm not even sure we would regress.
My concern was that the data would remain NULL after the realloc(NULL, 0), and
the argument would not be seen as present.  With the second temporary, all is
well.

That's all there is.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (26 preceding siblings ...)
  2023-06-12 20:51 ` mikael at gcc dot gnu.org
@ 2023-06-12 21:00 ` anlauf at gcc dot gnu.org
  2023-06-12 21:14 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-12 21:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #31 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #30)
> Now that I think again, I'm not even sure we would regress.
> My concern was that the data would remain NULL after the realloc(NULL, 0),
> and the argument would not be seen as present.  With the second temporary,
> all is well.

OK, I'll add that variant to the testcases.  Better safe than sorry... ;-)

> That's all there is.

OK, I'll then package it.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (27 preceding siblings ...)
  2023-06-12 21:00 ` anlauf at gcc dot gnu.org
@ 2023-06-12 21:14 ` anlauf at gcc dot gnu.org
  2023-06-13 18:09 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-12 21:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #32 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2023-June/059435.html

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (28 preceding siblings ...)
  2023-06-12 21:14 ` anlauf at gcc dot gnu.org
@ 2023-06-13 18:09 ` cvs-commit at gcc dot gnu.org
  2023-06-13 19:30 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  32 siblings, 0 replies; 33+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-13 18:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #33 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:c1691509e5a8875f36c068a5ea101bf13f140948

commit r14-1795-gc1691509e5a8875f36c068a5ea101bf13f140948
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Mon Jun 12 23:08:48 2023 +0200

    Fortran: fix passing of zero-sized array arguments to procedures [PR86277]

    gcc/fortran/ChangeLog:

            PR fortran/86277
            * trans-array.cc (gfc_trans_allocate_array_storage): When passing a
            zero-sized array with fixed (= non-dynamic) size, allocate
temporary
            by the caller, not by the callee.

    gcc/testsuite/ChangeLog:

            PR fortran/86277
            * gfortran.dg/zero_sized_14.f90: New test.
            * gfortran.dg/zero_sized_15.f90: New test.

    Co-authored-by: Mikael Morin <mikael@gcc.gnu.org>

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (29 preceding siblings ...)
  2023-06-13 18:09 ` cvs-commit at gcc dot gnu.org
@ 2023-06-13 19:30 ` anlauf at gcc dot gnu.org
  2023-06-29 19:50 ` cvs-commit at gcc dot gnu.org
  2023-06-29 19:53 ` anlauf at gcc dot gnu.org
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-13 19:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #34 from anlauf at gcc dot gnu.org ---
The missed-optimization (duplicate temporaries) is now tracked in pr110241.

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (30 preceding siblings ...)
  2023-06-13 19:30 ` anlauf at gcc dot gnu.org
@ 2023-06-29 19:50 ` cvs-commit at gcc dot gnu.org
  2023-06-29 19:53 ` anlauf at gcc dot gnu.org
  32 siblings, 0 replies; 33+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-29 19:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

--- Comment #35 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:74ef4221b5ebb1122349ad48422ddc40e98c267d

commit r13-7502-g74ef4221b5ebb1122349ad48422ddc40e98c267d
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Mon Jun 12 23:08:48 2023 +0200

    Fortran: fix passing of zero-sized array arguments to procedures [PR86277]

    gcc/fortran/ChangeLog:

            PR fortran/86277
            * trans-array.cc (gfc_trans_allocate_array_storage): When passing a
            zero-sized array with fixed (= non-dynamic) size, allocate
temporary
            by the caller, not by the callee.

    gcc/testsuite/ChangeLog:

            PR fortran/86277
            * gfortran.dg/zero_sized_14.f90: New test.
            * gfortran.dg/zero_sized_15.f90: New test.

    Co-authored-by: Mikael Morin <mikael@gcc.gnu.org>
    (cherry picked from commit c1691509e5a8875f36c068a5ea101bf13f140948)

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

* [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays
       [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
                   ` (31 preceding siblings ...)
  2023-06-29 19:50 ` cvs-commit at gcc dot gnu.org
@ 2023-06-29 19:53 ` anlauf at gcc dot gnu.org
  32 siblings, 0 replies; 33+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-06-29 19:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86277

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.2
             Status|ASSIGNED                    |RESOLVED

--- Comment #36 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-14, and backported to 13-branch for 13.2.

The backport required a backport of r14-90 concerning some poor scan patterns.

Closing.

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

end of thread, other threads:[~2023-06-29 19:53 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-86277-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 11:58 ` [Bug fortran/86277] Presence of optional arguments not recognized for zero length arrays jakub at gcc dot gnu.org
2021-06-01  8:11 ` rguenth at gcc dot gnu.org
2022-05-27  8:19 ` rguenth at gcc dot gnu.org
2023-06-09 19:48 ` anlauf at gcc dot gnu.org
2023-06-09 19:48 ` anlauf at gcc dot gnu.org
2023-06-10 10:27 ` mikael at gcc dot gnu.org
2023-06-10 10:30 ` mikael at gcc dot gnu.org
2023-06-10 10:40 ` mikael at gcc dot gnu.org
2023-06-10 11:45 ` mikael at gcc dot gnu.org
2023-06-10 13:21 ` anlauf at gcc dot gnu.org
2023-06-10 13:25 ` anlauf at gcc dot gnu.org
2023-06-10 19:27 ` anlauf at gcc dot gnu.org
2023-06-10 19:55 ` mikael at gcc dot gnu.org
2023-06-10 20:07 ` mikael at gcc dot gnu.org
2023-06-10 20:17 ` mikael at gcc dot gnu.org
2023-06-10 20:33 ` mikael at gcc dot gnu.org
2023-06-11 20:44 ` anlauf at gcc dot gnu.org
2023-06-12  7:13 ` mikael at gcc dot gnu.org
2023-06-12  7:39 ` mikael at gcc dot gnu.org
2023-06-12  7:56 ` mikael at gcc dot gnu.org
2023-06-12  8:17 ` mikael at gcc dot gnu.org
2023-06-12 10:38 ` mikael at gcc dot gnu.org
2023-06-12 19:42 ` anlauf at gcc dot gnu.org
2023-06-12 19:47 ` anlauf at gcc dot gnu.org
2023-06-12 20:16 ` mikael at gcc dot gnu.org
2023-06-12 20:32 ` anlauf at gcc dot gnu.org
2023-06-12 20:51 ` mikael at gcc dot gnu.org
2023-06-12 21:00 ` anlauf at gcc dot gnu.org
2023-06-12 21:14 ` anlauf at gcc dot gnu.org
2023-06-13 18:09 ` cvs-commit at gcc dot gnu.org
2023-06-13 19:30 ` anlauf at gcc dot gnu.org
2023-06-29 19:50 ` cvs-commit at gcc dot gnu.org
2023-06-29 19:53 ` anlauf at gcc dot gnu.org

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).