aboutsummaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-07-05 18:50:24 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2005-07-05 18:50:24 +0100
commit73f397d429016727961c2c4a9ff99cf2fc4ee7b3 (patch)
tree577db0c08701372c3b91ab562c53ebd97999043a /gcc/langhooks.c
parent692a7aa3a5aea69f4f771b8a56f6aac9866fe383 (diff)
downloadgcc-73f397d429016727961c2c4a9ff99cf2fc4ee7b3.zip
gcc-73f397d429016727961c2c4a9ff99cf2fc4ee7b3.tar.gz
gcc-73f397d429016727961c2c4a9ff99cf2fc4ee7b3.tar.bz2
re PR c/22013 (ICE in gimple_add_tmp_var, at gimplify.c:535)
PR c/22013 PR c/22098 * langhooks.h (struct lang_hooks): Add expr_to_decl. * langhooks.c (lhd_expr_to_decl): New. * langhooks-def.h (lhd_expr_to_decl, LANG_HOOKS_EXPR_TO_DECL): New. (LANG_HOOKS_INITIALIZER): Update. * tree.c (recompute_tree_invarant_for_addr_expr): Call expr_to_decl langhook. * c-tree.h (c_expr_to_decl): Declare. * c-typeck.c (c_expr_to_decl): New. (build_unary_op): Do not handle ADDR_EXPR of COMPOUND_LITERAL_EXPR specially. * c-objc-common.h (LANG_HOOKS_EXPR_TO_DECL): Define. testsuite: * gcc.c-torture/compile/pr22013-1.c, gcc.c-torture/execute/pr22098-1.c, gcc.c-torture/execute/pr22098-2.c, gcc.c-torture/execute/pr22098-3.c: New tests. From-SVN: r101630
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index e2939f0..5f3fb4b 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -543,3 +543,10 @@ lhd_to_target_charset (HOST_WIDE_INT c)
{
return c;
}
+
+tree
+lhd_expr_to_decl (tree expr, bool *tc ATTRIBUTE_UNUSED,
+ bool *ti ATTRIBUTE_UNUSED, bool *se ATTRIBUTE_UNUSED)
+{
+ return expr;
+}