public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/113621] New: New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails
@ 2024-01-26 20:06 seurer at gcc dot gnu.org
  2024-01-26 20:33 ` [Bug fortran/113621] " anlauf at gcc dot gnu.org
  2024-01-26 21:00 ` anlauf at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: seurer at gcc dot gnu.org @ 2024-01-26 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113621
           Summary: New test case gfortran.dg/optional_absent_10.f90 from
                    r14-8400-g186ae6d2cb93ad fails
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:186ae6d2cb93ad2e07117cff7e11def21fe285ae, r14-8400-g186ae6d2cb93ad
make  -k check-gcc-fortran RUNTESTFLAGS="--target_board=unix'{-m32,-m64}'
dg.exp=gfortran.dg/optional_absent_10.f90"
FAIL: gfortran.dg/optional_absent_10.f90   -O0  execution test
# of expected passes            11
# of expected passes            12
# of expected passes            23
# of unexpected failures        1
# of unexpected failures        1

This appears to be a problem just on big endian.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0xf7f803f3 in ???
#1  0x10000c68 in __m_char_MOD_three_val
        at
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.f90:97
#2  0x10001bcb in __m_char_MOD_test_char
        at
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.f90:19
#3  0x1000269b in p
        at
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.f90:218
#4  0x100026f3 in main
        at
/home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.f90:214
Segmentation fault


commit 186ae6d2cb93ad2e07117cff7e11def21fe285ae (HEAD)
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Jan 24 20:27:36 2024 +0100

    Fortran: passing of optional dummies to elemental procedures [PR113377]

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

* [Bug fortran/113621] New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails
  2024-01-26 20:06 [Bug fortran/113621] New: New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails seurer at gcc dot gnu.org
@ 2024-01-26 20:33 ` anlauf at gcc dot gnu.org
  2024-01-26 21:00 ` anlauf at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-01-26 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from anlauf at gcc dot gnu.org ---
(In reply to seurer from comment #0)
> This appears to be a problem just on big endian.

This is only for -m32, right?

> Program received signal SIGSEGV: Segmentation fault - invalid memory
> reference.
> 
> Backtrace for this error:
> #0  0xf7f803f3 in ???
> #1  0x10000c68 in __m_char_MOD_three_val
> 	at
> /home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.
> f90:97
> #2  0x10001bcb in __m_char_MOD_test_char
> 	at
> /home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.
> f90:19
> #3  0x1000269b in p
> 	at
> /home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.
> f90:218
> #4  0x100026f3 in main
> 	at
> /home/seurer/gcc/git/gcc-test2/gcc/testsuite/gfortran.dg/optional_absent_10.
> f90:214
> Segmentation fault

We likely mishandle the passing-by-value for character(len=4).

There previously was an issue with character(len=1), see pr110419,
fixed by Mikael.  This also occurred only on Power big endian for -m32.

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

* [Bug fortran/113621] New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails
  2024-01-26 20:06 [Bug fortran/113621] New: New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails seurer at gcc dot gnu.org
  2024-01-26 20:33 ` [Bug fortran/113621] " anlauf at gcc dot gnu.org
@ 2024-01-26 21:00 ` anlauf at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-01-26 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from anlauf at gcc dot gnu.org ---
I guess the following reduced testcase shows the same crash:

program test
  implicit none
  character(4) :: c(7) = "*"
  call three_val (c)
contains
  subroutine three_val (i, j)
    character(4), intent(in)           :: i(7)
    character(4), value,      optional :: j
    if (present (j)) stop 7
    call four     (i, j)
    call four_val (i, j)
  end

  elemental subroutine four (i, j)
    character(4), intent(in)           :: i
    character(4), intent(in), optional :: j
    if (present (j)) error stop 13
  end

  elemental subroutine four_val (i, j)
    character(4), intent(in)           :: i
    character(4), value,      optional :: j
    if (present (j)) error stop 14
  end
end

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

end of thread, other threads:[~2024-01-26 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26 20:06 [Bug fortran/113621] New: New test case gfortran.dg/optional_absent_10.f90 from r14-8400-g186ae6d2cb93ad fails seurer at gcc dot gnu.org
2024-01-26 20:33 ` [Bug fortran/113621] " anlauf at gcc dot gnu.org
2024-01-26 21:00 ` 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).