]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c-typeck.c (build_function_call): Check that the built-in function is of class BUILT_...
authorJeffrey A Law <law@cygnus.com>
Wed, 27 Oct 1999 05:32:43 +0000 (05:32 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 27 Oct 1999 05:32:43 +0000 (23:32 -0600)
        * c-typeck.c (build_function_call): Check that the built-in
        function is of class BUILT_IN_NORMAL before trying to recongize
        it as BUILT_IN_ABS.
        * calls.c (calls_function_1): Similarly for BUILT_IN_ALLOCA.
        * stmt.c (expand_end_cae): Similarly for BUILT_IN_CLASSIFY_TYPE.

        * call.c (build_over_call):  Check that the built-in function is
        of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
        * typeck.c (build_function_call_real): Similarly.

From-SVN: r30208

gcc/ChangeLog
gcc/c-typeck.c
gcc/calls.c
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/typeck.c
gcc/stmt.c

index b6839ada039a538d840784a5224def24d60a5e51..b67a02487d0e7bbec8da1cd04deb1cc31b625a11 100644 (file)
@@ -1,3 +1,10 @@
+Tue Oct 26 23:29:18 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * c-typeck.c (build_function_call): Check that the built-in
+       function is of class BUILT_IN_NORMAL before trying to recongize
+       it as BUILT_IN_ABS.
+       * calls.c (calls_function_1): Similarly for BUILT_IN_ALLOCA.
+       * stmt.c (expand_end_cae): Similarly for BUILT_IN_CLASSIFY_TYPE.
 
 Wed Oct 27 00:14:13 1999  Robert Lipe  <robertlipe@usa.net>
 
index 71d8262764f2136ee38d791b936290155052794e..4e6cadc1ff5bd704dd5627a5b0125fb5b61a3e52 100644 (file)
@@ -1461,7 +1461,8 @@ build_function_call (function, params)
 
   if (TREE_CODE (function) == ADDR_EXPR
       && TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL
-      && DECL_BUILT_IN (TREE_OPERAND (function, 0)))
+      && DECL_BUILT_IN (TREE_OPERAND (function, 0))
+      && DECL_BUILT_IN_CLASS (TREE_OPERAND (function, 0)) == BUILT_IN_NORMAL)
     switch (DECL_FUNCTION_CODE (TREE_OPERAND (function, 0)))
       {
       case BUILT_IN_ABS:
index 8113a919d7b3553e29fc33b28d346384a98e9025..3b4b1b209210d8236c5084095ecddbc6914b03a2 100644 (file)
@@ -218,6 +218,7 @@ calls_function_1 (exp, which)
          tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
 
          if ((DECL_BUILT_IN (fndecl)
+              && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
               && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_ALLOCA)
              || (DECL_SAVED_INSNS (fndecl)
                  && DECL_SAVED_INSNS (fndecl)->calls_alloca))
index 4f383787f41deed662c89e0bdcf87dca9667a5bf..1971fd27ad8d4c4c21386610499ef174d91e06cb 100644 (file)
@@ -1,3 +1,9 @@
+Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * call.c (build_over_call):  Check that the built-in function is
+       of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
+       * typeck.c (build_function_call_real): Similarly. 
+
 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
 
        * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
index b83efd531e5757f83089b3238e362edb6f63918a..889f25427eda0b407bf305288cbb733100a08dfe 100644 (file)
@@ -4150,7 +4150,8 @@ build_over_call (cand, args, flags)
 
   if (TREE_CODE (fn) == ADDR_EXPR
       && TREE_CODE (TREE_OPERAND (fn, 0)) == FUNCTION_DECL
-      && DECL_BUILT_IN (TREE_OPERAND (fn, 0)))
+      && DECL_BUILT_IN (TREE_OPERAND (fn, 0))
+      && DECL_BUILT_IN_CLASS (TREE_OPERAND (fn, 0)) == BUILT_IN_NORMAL)
     switch (DECL_FUNCTION_CODE (TREE_OPERAND (fn, 0)))
       {
       case BUILT_IN_ABS:
index 4bf817858ff248b131ca9e2898ec8315b5da13d3..a923b8117bf4b007347cf07b443cf8467109f192 100644 (file)
@@ -3017,7 +3017,8 @@ build_function_call_real (function, params, require_complete, flags)
 
   if (TREE_CODE (function) == ADDR_EXPR
       && TREE_CODE (TREE_OPERAND (function, 0)) == FUNCTION_DECL
-      && DECL_BUILT_IN (TREE_OPERAND (function, 0)))
+      && DECL_BUILT_IN (TREE_OPERAND (function, 0))
+      && DECL_BUILT_IN_CLASS (TREE_OPERAND (function, 0)) == BUILT_IN_NORMAL)
     switch (DECL_FUNCTION_CODE (TREE_OPERAND (function, 0)))
       {
       case BUILT_IN_ABS:
index 53fc1ed09faa474d59b64a237df56ecffadd2e7a..eeab664f6ce0b2edd19ebab131a514a355a02397 100644 (file)
@@ -5369,6 +5369,7 @@ expand_end_case (orig_index)
               || (TREE_CODE (index_expr) == CALL_EXPR
                   && TREE_CODE (TREE_OPERAND (index_expr, 0)) == ADDR_EXPR
                   && TREE_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == FUNCTION_DECL
+                  && DECL_BUILT_IN_CLASS (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == BUILT_IN_NORMAL
                   && DECL_FUNCTION_CODE (TREE_OPERAND (TREE_OPERAND (index_expr, 0), 0)) == BUILT_IN_CLASSIFY_TYPE)
               || (TREE_CODE (index_expr) == COMPOUND_EXPR
                   && TREE_CODE (TREE_OPERAND (index_expr, 1)) == INTEGER_CST))