+2003-03-14 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR optimization/8396
+ * tree-inline.c (initialize_inlined_parameters): Make sure the value
+ of read-only constant arguments is passed with the right type.
+
2003-03-14 Steven Bosscher <steven@gcc.gnu.org>
* doc/extend.texi (Function Names): Make the example compilable.
+2003-03-14 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.c-torture/compile/20030314-1.c: New test.
+
2003-03-13 Danny Smith <dannysmith@users.sourceforge.net>
* gcc.dg/dll-1.c: Remove thumb target. Change exp to _exp.
--- /dev/null
+/* PR optimization/8396 */
+/* Originator: <papadopo@shfj.cea.fr> */
+
+/* Verify that the tree inliner doesn't mess up the types
+ when passing the value of read-only constant arguments. */
+
+static inline bar(const short int xs, const short int xe)
+{
+ if (xe && (xs < xe))
+ ;
+}
+
+void f()
+{
+ short int xe;
+
+ bar(0, xe);
+}
if (DECL_P (value))
value = build1 (NOP_EXPR, TREE_TYPE (value), value);
+ /* If this is a constant, make sure it has the right type. */
+ else if (TREE_TYPE (value) != TREE_TYPE (p))
+ value = fold (build1 (NOP_EXPR, TREE_TYPE (p), value));
+
splay_tree_insert (id->decl_map,
(splay_tree_key) p,
(splay_tree_value) value);