* c-typeck.c (build_function_call): Check that the built-in
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Oct 1999 05:32:43 +0000 (05:32 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Oct 1999 05:32:43 +0000 (05:32 +0000)
        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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30208 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b6839ad..b67a024 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 71d8262..4e6cadc 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 8113a91..3b4b1b2 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 4f38378..1971fd2 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 b83efd5..889f254 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 4bf8178..a923b81 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 53fc1ed..eeab664 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))