This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Limit precision of *bitsizetypes types
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Oct 2006 17:04:12 -0500 (EST)
- Subject: [PATCH] Limit precision of *bitsizetypes types
The following patch fixes PRs 27885 and 28176. The problem in both
cases is the use of a TImode type on hppa64-hp-hpux11*. The
proposed fix is to limit the precision used for *bitsizetypes
types to MAX_FIXED_MODE_SIZE. This prevents the creation of
the TImode types on this target.
This isn't a complete fix as I believe that there's also a problem
with the assumption that the host supports a precision of
2 * HOST_BITS_PER_WIDE_INT. This isn't true on hppa64 hosts.
Probably, this needs specification in config.host.
I'm working on a patch to add TImode support to hppa64 but it's
not quite ready. I also need to verify the alignment and calling
conventions for TImode as it's not currently specified.
So, I would like to install on the trunk and 4.2 branch. Tested
on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11 with no regressions.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
:ADDPATCH middle-end fortran:
2006-10-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR fortran/27885
PR middle-end/28176
* stor-layout.c (set_sizetype): Limit precision of *bitsizetypes types
to MAX_FIXED_MODE_SIZE.
Index: stor-layout.c
===================================================================
--- stor-layout.c (revision 117956)
+++ stor-layout.c (working copy)
@@ -1934,7 +1934,8 @@
calculating signed sizes / offsets in bits. However, when
cross-compiling from a 32 bit to a 64 bit host, we are limited to 64 bit
precision. */
- int precision = MIN (oprecision + BITS_PER_UNIT_LOG + 1,
+ int precision = MIN (MIN (oprecision + BITS_PER_UNIT_LOG + 1,
+ MAX_FIXED_MODE_SIZE),
2 * HOST_BITS_PER_WIDE_INT);
tree t;