GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
TREE_PUBLIC (decl) = 1;
DECL_EXTERNAL (decl) = 1;
lang_hooks.decls.pushdecl (decl);
+ /* The decl was declared by the compiler. */
+ DECL_ARTIFICIAL (decl) = 1;
+ /* And we don't want debug info for it. */
+ DECL_IGNORED_P (decl) = 1;
return decl;
}
elt = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (elt)),
elt);
addr = fold_convert (ptr_type_node, elt ? elt : base);
- addr = fold_build2 (PLUS_EXPR, ptr_type_node,
- addr, fold_convert (ptr_type_node,
+ addr = fold_build2 (POINTER_PLUS_EXPR, ptr_type_node,
+ addr, fold_convert (sizetype,
byte_position (field)));
}
else
case INDIRECT_REF:
addr = TREE_OPERAND (t, 0);
base = addr;
- limit = fold_build2 (MINUS_EXPR, ptr_type_node,
- fold_build2 (PLUS_EXPR, ptr_type_node, base, size),
- integer_one_node);
+ limit = fold_build2 (POINTER_PLUS_EXPR, ptr_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, ptr_type_node, base,
+ size),
+ size_int (-1));
break;
case TARGET_MEM_REF:
addr = tree_mem_ref_addr (ptr_type_node, t);
base = addr;
- limit = fold_build2 (MINUS_EXPR, ptr_type_node,
- fold_build2 (PLUS_EXPR, ptr_type_node, base, size),
- build_int_cst (ptr_type_node, 1));
+ limit = fold_build2 (POINTER_PLUS_EXPR, ptr_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, ptr_type_node, base,
+ size),
+ size_int (-1));
break;
case ARRAY_RANGE_REF:
bpu = bitsize_int (BITS_PER_UNIT);
ofs = convert (bitsizetype, TREE_OPERAND (t, 2));
rem = size_binop (TRUNC_MOD_EXPR, ofs, bpu);
- ofs = size_binop (TRUNC_DIV_EXPR, ofs, bpu);
+ ofs = fold_convert (sizetype, size_binop (TRUNC_DIV_EXPR, ofs, bpu));
size = convert (bitsizetype, TREE_OPERAND (t, 1));
size = size_binop (PLUS_EXPR, size, rem);
addr = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
addr = convert (ptr_type_node, addr);
- addr = fold_build2 (PLUS_EXPR, ptr_type_node, addr, ofs);
+ addr = fold_build2 (POINTER_PLUS_EXPR, ptr_type_node, addr, ofs);
base = addr;
- limit = fold_build2 (MINUS_EXPR, ptr_type_node,
- fold_build2 (PLUS_EXPR, ptr_type_node, base, size),
- integer_one_node);
+ limit = fold_build2 (POINTER_PLUS_EXPR, ptr_type_node,
+ fold_build2 (POINTER_PLUS_EXPR, ptr_type_node,
+ base, size),
+ size_int (-1));
}
break;
/* Add the __mf_register call at the current appending point. */
if (tsi_end_p (initially_stmts))
- warning (0, "mudflap cannot track %qs in stub function",
- IDENTIFIER_POINTER (DECL_NAME (decl)));
+ {
+ if (!DECL_ARTIFICIAL (decl))
+ warning (0, "mudflap cannot track %qs in stub function",
+ IDENTIFIER_POINTER (DECL_NAME (decl)));
+ }
else
{
tsi_link_before (&initially_stmts, register_fncall,