This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RS6000] Fix PR 18686


c_lex on 3.4 branch doesn't canonicalize constants, so the comparisons
against integer_zero_node and integer_one_node always fail.

	PR target/18686
	* config/rs6000/rs6000-c.c (rs6000_pragma_longcall): Use
	integer_zerop and integer_onep instead of comparing against
	canonical trees.

Bootstrapped, regression tested powerpc-linux.

diff -urp -xCVS -x'*~' gcc-3.4-virgin/gcc/config/rs6000/rs6000-c.c gcc-3.4/gcc/config/rs6000/rs6000-c.c
--- gcc-3.4-virgin/gcc/config/rs6000/rs6000-c.c	2004-09-01 16:03:59.000000000 +0930
+++ gcc-3.4/gcc/config/rs6000/rs6000-c.c	2004-11-26 23:04:03.974347744 +1030
@@ -62,13 +62,13 @@ rs6000_pragma_longcall (cpp_reader *pfil
   if (c_lex (&x) != CPP_CLOSE_PAREN)
     SYNTAX_ERROR ("missing close paren");
 
-  if (n != integer_zero_node && n != integer_one_node)
+  if (!integer_zerop (n) && !integer_onep (n))
     SYNTAX_ERROR ("number must be 0 or 1");
 
   if (c_lex (&x) != CPP_EOF)
     warning ("junk at end of #pragma longcall");
 
-  rs6000_default_long_calls = (n == integer_one_node);
+  rs6000_default_long_calls = integer_onep (n);
 }
 
 /* Handle defining many CPP flags based on TARGET_xxx.  As a general

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]