public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
@ 2021-12-28 21:30 ` anlauf at gcc dot gnu.org
  2022-04-26 14:35 ` hp at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-28 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #2 from anlauf at gcc dot gnu.org ---
On x86_64-pc-linux-gnu I see it too when running the executable under valgrind.

Commenting line 12

!    a = a           ! This used to ICE.

the problem disappears.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
  2021-12-28 21:30 ` [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0 anlauf at gcc dot gnu.org
@ 2022-04-26 14:35 ` hp at gcc dot gnu.org
  2022-04-26 17:03 ` kargl at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: hp at gcc dot gnu.org @ 2022-04-26 14:35 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

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

--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
Now also failing execution at -O0 on cris-elf and apparently
s390x-ibm-linux-gnu since r12-8227-g89ca0fffa48b79.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
  2021-12-28 21:30 ` [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0 anlauf at gcc dot gnu.org
  2022-04-26 14:35 ` hp at gcc dot gnu.org
@ 2022-04-26 17:03 ` kargl at gcc dot gnu.org
  2022-04-27  0:03 ` hp at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-04-26 17:03 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Hans-Peter Nilsson from comment #3)
> Now also failing execution at -O0 on cris-elf and apparently
> s390x-ibm-linux-gnu since r12-8227-g89ca0fffa48b79.

The code is clearly invalid Fortran.

module m
contains
  subroutine s(inp)
    character(*), intent(in) :: inp
    character(:), allocatable :: a

    a = a           ! This used to ICE.
!
! The above is an invalid reference of an unallocated allocatable on
! the RHS.
!
    a = inp
    a = a           ! This used to ICE too
    if ((len (a) .ne. 5) .or. (a .ne. "hello")) STOP 1
    a = a(2:3)      ! Make sure that temporary creation is not broken.
    if ((len (a) .ne. 2) .or. (a .ne. "el")) STOP 2
    deallocate (a)
    a = a           ! This would ICE too.
!
! The above is an invalid reference of an unallocated allocatable on
! the RHS.
!
  end subroutine s
end module m

  use m
  call s("hello")
end

You either need to remove the above two lines to get a valid program
or remove the testcase as it's testing processor dependent behavior.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-04-26 17:03 ` kargl at gcc dot gnu.org
@ 2022-04-27  0:03 ` hp at gcc dot gnu.org
  2022-04-27  1:51 ` sgk at troutmask dot apl.washington.edu
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: hp at gcc dot gnu.org @ 2022-04-27  0:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to kargl from comment #4)
> You either need to remove the above two lines to get a valid program
> or remove the testcase as it's testing processor dependent behavior.

How about changing it to compile-only?  That would avoid interfering with its
value as a regression-test for PR20670, where it ICE'd.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-04-27  0:03 ` hp at gcc dot gnu.org
@ 2022-04-27  1:51 ` sgk at troutmask dot apl.washington.edu
  2022-04-27  5:47 ` tkoenig at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-27  1:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 27, 2022 at 12:03:54AM +0000, hp at gcc dot gnu.org wrote:
> 
> --- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
> (In reply to kargl from comment #4)
> > You either need to remove the above two lines to get a valid program
> > or remove the testcase as it's testing processor dependent behavior.
> 
> How about changing it to compile-only?  That would avoid interfering with its
> value as a regression-test for PR20670, where it ICE'd.
> 

I'm fine with that.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-04-27  1:51 ` sgk at troutmask dot apl.washington.edu
@ 2022-04-27  5:47 ` tkoenig at gcc dot gnu.org
  2022-04-27 16:50 ` tkoenig at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2022-04-27  5:47 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Steve Kargl from comment #6)
> On Wed, Apr 27, 2022 at 12:03:54AM +0000, hp at gcc dot gnu.org wrote:
> > 
> > --- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
> > (In reply to kargl from comment #4)
> > > You either need to remove the above two lines to get a valid program
> > > or remove the testcase as it's testing processor dependent behavior.
> > 
> > How about changing it to compile-only?  That would avoid interfering with its
> > value as a regression-test for PR20670, where it ICE'd.
> > 
> 
> I'm fine with that.

OK, I will then make that change.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-04-27  5:47 ` tkoenig at gcc dot gnu.org
@ 2022-04-27 16:50 ` tkoenig at gcc dot gnu.org
  2022-04-27 18:39 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2022-04-27 16:50 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed on trunk by 

https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362724.html .

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-04-27 16:50 ` tkoenig at gcc dot gnu.org
@ 2022-04-27 18:39 ` anlauf at gcc dot gnu.org
  2022-04-27 20:49 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-04-27 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #8)
> Fixed on trunk by 
> 
> https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362724.html .

Thomas,

you'd better re-read Steve's analysis.

Your patch left the first

    a = a           ! This used to ICE.

which is invalid at runtime.  Try yourself running under valgrind.

Either remove this line too, or protect it with an if (allocated (a))

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-04-27 18:39 ` anlauf at gcc dot gnu.org
@ 2022-04-27 20:49 ` tkoenig at gcc dot gnu.org
  2022-04-27 21:40 ` sgk at troutmask dot apl.washington.edu
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2022-04-27 20:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to anlauf from comment #9)
> (In reply to Thomas Koenig from comment #8)
> > Fixed on trunk by 
> > 
> > https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362724.html .
> 
> Thomas,
> 
> you'd better re-read Steve's analysis.
> 
> Your patch left the first
> 
>     a = a           ! This used to ICE.
> 
> which is invalid at runtime.  Try yourself running under valgrind.
> 
> Either remove this line too, or protect it with an if (allocated (a))

Thanks for pointing this out.

Removed with https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362729.html .

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-04-27 20:49 ` tkoenig at gcc dot gnu.org
@ 2022-04-27 21:40 ` sgk at troutmask dot apl.washington.edu
  2022-08-26 20:52 ` anlauf at gcc dot gnu.org
  2023-08-15 20:26 ` anlauf at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-04-27 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Apr 27, 2022 at 08:49:17PM +0000, tkoenig at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78054
> 
> --- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
> (In reply to anlauf from comment #9)
> > (In reply to Thomas Koenig from comment #8)
> > > Fixed on trunk by 
> > > 
> > > https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362724.html .
> > 
> > Thomas,
> > 
> > you'd better re-read Steve's analysis.
> > 
> > Your patch left the first
> > 
> >     a = a           ! This used to ICE.
> > 
> > which is invalid at runtime.  Try yourself running under valgrind.
> > 
> > Either remove this line too, or protect it with an if (allocated (a))
> 
> Thanks for pointing this out.
> 
> Removed with https://gcc.gnu.org/pipermail/gcc-cvs/2022-April/362729.html .
> 

Thanks Thomas!

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-04-27 21:40 ` sgk at troutmask dot apl.washington.edu
@ 2022-08-26 20:52 ` anlauf at gcc dot gnu.org
  2023-08-15 20:26 ` anlauf at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-08-26 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #12 from anlauf at gcc dot gnu.org ---
Should be fixed since r12-8291-g58e4a744b6e8140499ed6c33a8e9a6557e102f74.

Please close if this can be confirmed.

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

* [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
       [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2022-08-26 20:52 ` anlauf at gcc dot gnu.org
@ 2023-08-15 20:26 ` anlauf at gcc dot gnu.org
  11 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-08-15 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|WAITING                     |RESOLVED

--- Comment #13 from anlauf at gcc dot gnu.org ---
Closing.

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

end of thread, other threads:[~2023-08-15 20:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
2021-12-28 21:30 ` [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0 anlauf at gcc dot gnu.org
2022-04-26 14:35 ` hp at gcc dot gnu.org
2022-04-26 17:03 ` kargl at gcc dot gnu.org
2022-04-27  0:03 ` hp at gcc dot gnu.org
2022-04-27  1:51 ` sgk at troutmask dot apl.washington.edu
2022-04-27  5:47 ` tkoenig at gcc dot gnu.org
2022-04-27 16:50 ` tkoenig at gcc dot gnu.org
2022-04-27 18:39 ` anlauf at gcc dot gnu.org
2022-04-27 20:49 ` tkoenig at gcc dot gnu.org
2022-04-27 21:40 ` sgk at troutmask dot apl.washington.edu
2022-08-26 20:52 ` anlauf at gcc dot gnu.org
2023-08-15 20:26 ` 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).