public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test
@ 2023-04-02 15:50 danglin at gcc dot gnu.org
  2023-04-02 16:12 ` [Bug target/109374] " ebotcazou at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-04-02 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109374
           Summary: FAIL: gnat.dg/div_zero.adb execution test
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa*-*-linux*
            Target: hppa*-*-linux*
             Build: hppa*-*-linux*

Executing on host: /home/dave/gnu/gcc/objdir/gcc/gnatmake
--GCC=/home/dave/gnu/gcc/objdir/gcc/xgcc
--GNATBIND=/home/dave/gnu/gcc/objdir/gcc/gnatbind
--GNATLINK=/home/dave/gnu/gcc/objdir/gcc/gnatlink -cargs -B/ho
me/dave/gnu/gcc/objdir/gcc -largs --GCC=/home/dave/gnu/gcc/objdir/gcc/xgcc\
-B/home/dave/gnu/gcc/objdir/gcc\  -margs
--RTS=/home/dave/gnu/gcc/objdir/hppa-linux-gnu/./libada -q -f 
/home/dave/gnu/gcc/gcc/gcc/test
suite/gnat.dg/div_zero.adb  -largs  -margs  -fdiagnostics-plain-output   
-largs  -lm  -margs -o ./div_zero.exe    (timeout = 300)
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/gnatmake
--GCC=/home/dave/gnu/gcc/objdir/gcc/xgcc
--GNATBIND=/home/dave/gnu/gcc/objdir/gcc/gnatbind
--GNATLINK=/home/dave/gnu/gcc/objdir/gcc/gnatlink -cargs -B/
home/dave/gnu/gcc/objdir/gcc -largs --GCC=/home/dave/gnu/gcc/objdir/gcc/xgcc
-B/home/dave/gnu/gcc/objdir/gcc  -margs
--RTS=/home/dave/gnu/gcc/objdir/hppa-linux-gnu/./libada -q -f
/home/dave/gnu/gcc/gcc/gcc/tests
uite/gnat.dg/div_zero.adb -largs -margs -fdiagnostics-plain-output -largs -lm
-margs -o ./div_zero.exe
Executing on host: /home/dave/gnu/gcc/objdir/gcc/gnatclean -c -q -n ./div_zero 
 (timeout = 300)
spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir/gcc/gnatclean -c -q -n
./div_zero
./div_zero.ali
./div_zero.o
PASS: gnat.dg/div_zero.adb (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/dave/gnu/gcc/objdir/gcc::/home/dave/gnu/gcc/objdir/gcc:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libssp/.libs:/hom
e/dave/gnu/gcc/objdir/hppa-linux-gnu/libphobos/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgm2/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgomp/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/liba
tomic/.libs:/home/dave/gnu/gcc/objdir/./gcc:/home/dave/gnu/gcc/objdir/./prev-gcc:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libstdc++-v3/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libssp/.libs:/home/dave/g
nu/gcc/objdir/hppa-linux-gnu/libphobos/src/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgm2/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libgomp/.libs:/home/dave/gnu/gcc/objdir/hppa-linux-gnu/libatomic/.l
ibs:/home/dave/gnu/gcc/objdir/./gcc:/home/dave/gnu/gcc/objdir/./prev-gcc
Execution timeout is: 300
spawn [open ...]

raised CONSTRAINT_ERROR : SIGFPE
FAIL: gnat.dg/div_zero.adb execution test

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
@ 2023-04-02 16:12 ` ebotcazou at gcc dot gnu.org
  2023-04-02 16:37 ` dave.anglin at bell dot net
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-02 16:12 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-04-02
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |ebotcazou at gcc dot gnu.org
          Component|ada                         |target

--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
See the comment in the test.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
  2023-04-02 16:12 ` [Bug target/109374] " ebotcazou at gcc dot gnu.org
@ 2023-04-02 16:37 ` dave.anglin at bell dot net
  2023-04-02 16:54 ` ebotcazou at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2023-04-02 16:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from dave.anglin at bell dot net ---
I believe hppa-linux can unwind through signal frames.  VDSO support was added
fairly recently.
The unwind tests in glibc all pass.

GDB needs an update to unwind through signal frames with recent kernels.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
  2023-04-02 16:12 ` [Bug target/109374] " ebotcazou at gcc dot gnu.org
  2023-04-02 16:37 ` dave.anglin at bell dot net
@ 2023-04-02 16:54 ` ebotcazou at gcc dot gnu.org
  2023-04-02 17:24 ` dave.anglin at bell dot net
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-02 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> I believe hppa-linux can unwind through signal frames.  VDSO support was
> added fairly recently.

Does the unwinder compensate for the signal vs non-signal discrepancy?  See
__gnat_adjust_context_for_raise in ada/init.c:470 for possible tweaks.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-04-02 16:54 ` ebotcazou at gcc dot gnu.org
@ 2023-04-02 17:24 ` dave.anglin at bell dot net
  2023-04-03 20:27 ` danglin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2023-04-02 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from dave.anglin at bell dot net ---
On 2023-04-02 12:54 p.m., ebotcazou at gcc dot gnu.org wrote:
>> I believe hppa-linux can unwind through signal frames.  VDSO support was
>> added fairly recently.
> Does the unwinder compensate for the signal vs non-signal discrepancy?  See
> __gnat_adjust_context_for_raise in ada/init.c:470 for possible tweaks.
I don't think it does with VDSO kernels.  The unwinder uses
MD_FALLBACK_FRAME_STATE_FOR
with non VDSO kernels.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-04-02 17:24 ` dave.anglin at bell dot net
@ 2023-04-03 20:27 ` danglin at gcc dot gnu.org
  2023-04-03 20:46 ` ebotcazou at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-04-03 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> ---
I'm not sure what is expected here:

(gdb) r
Starting program: /home/dave/gnu/gcc/objdir/gcc/testsuite/gnat/div_zero.exe
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.

Program received signal SIGFPE, Arithmetic exception.
$$divoI () at ../../../gcc/libgcc/config/pa/milli64.S:448
448             addit,= 0,arg1,r0       /*  trap if divisor == 0 */
(gdb) c
Continuing.

Breakpoint 1, __gnat_error_handler (sig=8, si=0xf8f02488, ucontext=0xf8f02508)
at init.c:538
538          now, before we possibly trigger a recursive fault below.  */
(gdb) p/x ((ucontext_t *) ucontext)->uc_mcontext.sc_iaoq[0]
$2 = 0x1d1bf
(gdb) bt
#0  __gnat_error_handler (sig=8, si=0xf8f02488, ucontext=0xf8f02508) at
init.c:538
#1  <signal handler called>
#2  $$divoI () at ../../../gcc/libgcc/config/pa/milli64.S:448
#3  0x0001a124 in div_zero ()
(gdb) frame 2
#2  $$divoI () at ../../../gcc/libgcc/config/pa/milli64.S:448
448             addit,= 0,arg1,r0       /*  trap if divisor == 0 */
(gdb) disass $pc-16,$pc+16
Dump of assembler code from 0x1d1ac to 0x1d1cc:
   0x0001d1ac <$$divoI+428>:    bv,n r0(r31)
   0x0001d1b0 <$$divoI+432>:    nop
   0x0001d1b4 <$$divoI+436>:    blr,n r25,r0
   0x0001d1b8 <$$divoI+440>:    nop
=> 0x0001d1bc <$$divoI+444>:    addi,tc,= 0,r25,r0
   0x0001d1c0 <$$divoI+448>:    nop
   0x0001d1c4 <$$divoI+452>:    bv r0(r31)
   0x0001d1c8 <$$divoI+456>:    copy r26,ret1
End of assembler dump.
(gdb) frame 0
#0  __gnat_error_handler (sig=8, si=0xf8f02488, ucontext=0xf8f02508) at
init.c:538
538          now, before we possibly trigger a recursive fault below.  */
(gdb) ptype ((ucontext_t *) ucontext)->uc_mcontext.sc_iaoq[0]
type = unsigned long

As things stands, the pc (head iaoq value) points at the nop after the
addi,tc,= which caused the trap.

As far as I can tell, this test has always failed on both 32-bit linux and
hpux.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-04-03 20:27 ` danglin at gcc dot gnu.org
@ 2023-04-03 20:46 ` ebotcazou at gcc dot gnu.org
  2023-04-03 20:59 ` dave.anglin at bell dot net
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-03 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> As far as I can tell, this test has always failed on both 32-bit linux and
> hpux.

Does libgcc/config/pa/milli64.S contain CFI directives or EH tables?

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-04-03 20:46 ` ebotcazou at gcc dot gnu.org
@ 2023-04-03 20:59 ` dave.anglin at bell dot net
  2023-04-03 21:06 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2023-04-03 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from dave.anglin at bell dot net ---
On 2023-04-03 4:46 p.m., ebotcazou at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109374
>
> --- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
>> As far as I can tell, this test has always failed on both 32-bit linux and
>> hpux.
> Does libgcc/config/pa/milli64.S contain CFI directives or EH tables?
No.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-04-03 20:59 ` dave.anglin at bell dot net
@ 2023-04-03 21:06 ` ebotcazou at gcc dot gnu.org
  2023-04-05 14:45 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-03 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> No.

Then the unwinder cannot unwind through it and the test cannot pass.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-04-03 21:06 ` ebotcazou at gcc dot gnu.org
@ 2023-04-05 14:45 ` cvs-commit at gcc dot gnu.org
  2023-04-05 14:47 ` danglin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-05 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by John David Anglin <danglin@gcc.gnu.org>:

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

commit r13-7012-gddb0f66e6c1e846bdc217075c9a770bfd0b01970
Author: John David Anglin <danglin@gcc.gnu.org>
Date:   Wed Apr 5 14:44:54 2023 +0000

    Add assember CFI directives to millicode division and remainder routines.

    The millicode division and remainder routines trap division by zero.
    The unwinder needs these directives to unwind divide by zero traps.

    2023-04-05  John David Anglin  <danglin@gcc.gnu.org>

    libgcc/ChangeLog:

            PR target/109374
            * config/pa/milli64.S (RETURN_COLUMN): Define.
            ($$divI): Add CFI directives.
            ($$divU): Likewise.
            ($$remI): Likewise.
            ($$remU): Likewise.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-04-05 14:45 ` cvs-commit at gcc dot gnu.org
@ 2023-04-05 14:47 ` danglin at gcc dot gnu.org
  2023-04-05 14:56 ` ebotcazou at gcc dot gnu.org
  2023-04-05 15:07 ` dave.anglin at bell dot net
  11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-04-05 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> ---
Fixed on trunk.

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-04-05 14:47 ` danglin at gcc dot gnu.org
@ 2023-04-05 14:56 ` ebotcazou at gcc dot gnu.org
  2023-04-05 15:07 ` dave.anglin at bell dot net
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-05 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Nice work!

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

* [Bug target/109374] FAIL: gnat.dg/div_zero.adb execution test
  2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-04-05 14:56 ` ebotcazou at gcc dot gnu.org
@ 2023-04-05 15:07 ` dave.anglin at bell dot net
  11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2023-04-05 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from dave.anglin at bell dot net ---
On 2023-04-05 10:56 a.m., ebotcazou at gcc dot gnu.org wrote:
> Nice work!
Your comments were accurate and very helpful.

Thanks,
dave

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

end of thread, other threads:[~2023-04-05 15:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-02 15:50 [Bug ada/109374] New: FAIL: gnat.dg/div_zero.adb execution test danglin at gcc dot gnu.org
2023-04-02 16:12 ` [Bug target/109374] " ebotcazou at gcc dot gnu.org
2023-04-02 16:37 ` dave.anglin at bell dot net
2023-04-02 16:54 ` ebotcazou at gcc dot gnu.org
2023-04-02 17:24 ` dave.anglin at bell dot net
2023-04-03 20:27 ` danglin at gcc dot gnu.org
2023-04-03 20:46 ` ebotcazou at gcc dot gnu.org
2023-04-03 20:59 ` dave.anglin at bell dot net
2023-04-03 21:06 ` ebotcazou at gcc dot gnu.org
2023-04-05 14:45 ` cvs-commit at gcc dot gnu.org
2023-04-05 14:47 ` danglin at gcc dot gnu.org
2023-04-05 14:56 ` ebotcazou at gcc dot gnu.org
2023-04-05 15:07 ` dave.anglin at bell dot net

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