diff options
author | Tom de Vries <tdevries@suse.de> | 2024-07-31 13:11:48 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-07-31 13:11:48 +0200 |
commit | 50fb268a6ff81c5a88119474ffe61cd4df1a8248 (patch) | |
tree | 5f66ad63b2c7c14ab62f175bc3ce2338316fd1ba /libctf/ctf-subr.c | |
parent | c39fbc749a545ac2b728173a340095b614585c96 (diff) | |
download | binutils-50fb268a6ff81c5a88119474ffe61cd4df1a8248.zip binutils-50fb268a6ff81c5a88119474ffe61cd4df1a8248.tar.gz binutils-50fb268a6ff81c5a88119474ffe61cd4df1a8248.tar.bz2 |
[gdb/exp] Fix gdb.fortran/intrinsics.exp fail on arm
When running test-case gdb.fortran/intrinsics.exp on arm-linux, I get:
...
(gdb) p cmplx (4,4,16)^M
/home/linux/gdb/src/gdb/f-lang.c:1002: internal-error: eval_op_f_cmplx: \
Assertion `kind_arg->code () == TYPE_CODE_COMPLEX' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
----- Backtrace -----^M
FAIL: gdb.fortran/intrinsics.exp: p cmplx (4,4,16) (GDB internal error)
...
The problem is that 16-byte floats are unsupported:
...
$ gfortran test.f90
test.f90:2:17:
2 | REAL(kind=16) :: foo = 1
| 1
Error: Kind 16 not supported for type REAL at (1)
...
and consequently we end up with a builtin_real_s16 and builtin_complex_s16 with
code TYPE_CODE_ERROR.
Fix this by bailing out asap when encountering such a type.
Without this patch we're able to do the rather useless:
...
(gdb) ptype real*16
type = real*16
(gdb) ptype real_16
type = real*16
...
but with this patch we get:
...
(gdb) ptype real*16
unsupported kind 16 for type real*4
(gdb) ptype real_16
unsupported type real*16
...
Tested on arm-linux.
PR fortran/30537
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30537
Diffstat (limited to 'libctf/ctf-subr.c')
0 files changed, 0 insertions, 0 deletions