summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-17 20:55:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-17 20:55:42 +0000
commitc291d34a55ed4b62ac14e4c73cf1d3ac4c58b079 (patch)
tree0175ffcfd1d2d531d5e03b3bdd4bb83bded36f60 /gcc/gimplify.c
parent06422b555019f5efd992e7d11e3fd76291c20077 (diff)
downloadgcc-c291d34a55ed4b62ac14e4c73cf1d3ac4c58b079.tar.gz
PR middle-end/59706
* gimplify.c (gimplify_expr): Use create_tmp_var instead of create_tmp_var_raw. If cond doesn't have integral type, don't add the IFN_ANNOTATE builtin at all. * gfortran.dg/pr59706.f90: New test. * g++.dg/ext/pr59706.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206732 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 202d084f09f..9c9998dd193 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7491,7 +7491,14 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
{
tree cond = TREE_OPERAND (*expr_p, 0);
tree id = TREE_OPERAND (*expr_p, 1);
- tree tmp = create_tmp_var_raw (TREE_TYPE(cond), NULL);
+ tree type = TREE_TYPE (cond);
+ if (!INTEGRAL_TYPE_P (type))
+ {
+ *expr_p = cond;
+ ret = GS_OK;
+ break;
+ }
+ tree tmp = create_tmp_var (type, NULL);
gimplify_arg (&cond, pre_p, EXPR_LOCATION (*expr_p));
gimple call = gimple_build_call_internal (IFN_ANNOTATE, 2,
cond, id);