[committed] Fix PR middle-end/34931

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Jan 24 18:23:00 GMT 2008


The enclosed change backports the fixes for PR other/30182.  This
provides the correct hooks under hpux11 for the finite builtin.

Tested on hppa2.0w-hp-hpux11.11.  Committed to 4.2.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2008-01-24  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR middle-end/34931
	Backport:
	2007-01-25  Steve Ellcey  <sje@cup.hp.com>

	PR other/30182
	* config/pa/pa.c (pa_init_builtins): Set asm names for finite routines.
	* config/ia64/ia64.c (ia64_init_builtins):  Ditto.

	2007-01-26  Steve Ellcey  <sje@cup.hp.com>

	PR other/30182
	* config/pa/pa.h (TARGET_HPUX_11): New.
	* config/pa/pa-hpux11.h (TARGET_HPUX_11): New.
	* config/pa/pa.c (pa_init_builtins): Use TARGET_HPUX_11.

Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c	(revision 131763)
+++ config/ia64/ia64.c	(working copy)
@@ -9174,6 +9174,19 @@
 	       IA64_BUILTIN_FLUSHRS);
 
 #undef def_builtin
+
+  if (TARGET_HPUX)
+    {
+      if (built_in_decls [BUILT_IN_FINITE])
+	set_user_assembler_name (built_in_decls [BUILT_IN_FINITE],
+	  "_Isfinite");
+      if (built_in_decls [BUILT_IN_FINITEF])
+	set_user_assembler_name (built_in_decls [BUILT_IN_FINITEF],
+	  "_Isfinitef");
+      if (built_in_decls [BUILT_IN_FINITEL])
+	set_user_assembler_name (built_in_decls [BUILT_IN_FINITEL],
+	  "_Isfinitef128");
+    }
 }
 
 rtx
Index: config/pa/pa-hpux11.h
===================================================================
--- config/pa/pa-hpux11.h	(revision 131763)
+++ config/pa/pa-hpux11.h	(working copy)
@@ -177,3 +178,6 @@
    with secondary definition (weak) symbols.  */
 #undef TARGET_SOM_SDEF
 #define TARGET_SOM_SDEF 1
+
+#undef TARGET_HPUX_11
+#define TARGET_HPUX_11 1
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 131763)
+++ config/pa/pa.c	(working copy)
@@ -511,6 +511,12 @@
   implicit_built_in_decls[(int) BUILT_IN_FPUTC_UNLOCKED]
     = implicit_built_in_decls[(int) BUILT_IN_PUTC_UNLOCKED];
 #endif
+#if TARGET_HPUX_11
+  if (built_in_decls [BUILT_IN_FINITE])
+    set_user_assembler_name (built_in_decls [BUILT_IN_FINITE], "_Isfinite");
+  if (built_in_decls [BUILT_IN_FINITEF])
+    set_user_assembler_name (built_in_decls [BUILT_IN_FINITEF], "_Isfinitef");
+#endif
 }
 
 /* Function to init struct machine_function.
   if (GET_CODE (orig) == SYMBOL_REF)
Index: config/pa/pa.h
===================================================================
--- config/pa/pa.h	(revision 131763)
+++ config/pa/pa.h	(working copy)
@@ -83,6 +83,11 @@
 #define TARGET_HPUX_10_10 0
 #endif
 
+/* HP-UX 11.* features (11.00, 11.11, 11.23, etc.)  */
+#ifndef TARGET_HPUX_11
+#define TARGET_HPUX_11 0
+#endif
+
 /* HP-UX 11i multibyte and UNIX 98 extensions.  */
 #ifndef TARGET_HPUX_11_11
 #define TARGET_HPUX_11_11 0



More information about the Gcc-patches mailing list