diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1998-09-02 11:31:14 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1998-09-02 12:31:14 +0100 |
commit | 33368c84ce4a620bc4204bd5bef53989ae9122ec (patch) | |
tree | d56c1a1fa5de94378ca1781faa11d30602a7cbbc /gcc/dwarfout.c | |
parent | 67988bd25873c52046ee0b16b800ce4f5010b339 (diff) | |
download | gcc-33368c84ce4a620bc4204bd5bef53989ae9122ec.zip gcc-33368c84ce4a620bc4204bd5bef53989ae9122ec.tar.gz gcc-33368c84ce4a620bc4204bd5bef53989ae9122ec.tar.bz2 |
dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles as FT_float.
* dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles
as FT_float.
From-SVN: r22169
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 80475c6..bf46459 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -1421,7 +1421,16 @@ fundamental_type_code (type) } if (TYPE_PRECISION (type) == DOUBLE_TYPE_SIZE) - return FT_dbl_prec_float; + { + /* On the SH, when compiling with -m3e or -m4-single-only, both + float and double are 32 bits. But since the debugger doesn't + know about the subtarget, it always thinks double is 64 bits. + So we have to tell the debugger that the type is float to + make the output of the 'print' command etc. readable. */ + if (DOUBLE_TYPE_SIZE == FLOAT_TYPE_SIZE && FLOAT_TYPE_SIZE == 32) + return return FT_float; + return FT_dbl_prec_float; + } if (TYPE_PRECISION (type) == FLOAT_TYPE_SIZE) return FT_float; |