OSDN Git Service

2012-07-02 Martin Jambor <mjambor@suse.cz>
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2012 15:43:56 +0000 (15:43 +0000)
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2012 15:43:56 +0000 (15:43 +0000)
PR middle-end/38474
* ipa-prop.c (compute_known_type_jump_func): Put BINFO check before a
dynamic type change check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@189164 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa-prop.c

index f111f5a..d80e939 100644 (file)
@@ -1,3 +1,12 @@
+2012-07-02  Martin Jambor  <mjambor@suse.cz>
+
+       Backport from mainline.
+       2012-07-02  Martin Jambor  <mjambor@suse.cz>
+
+       PR middle-end/38474
+       * ipa-prop.c (compute_known_type_jump_func): Put BINFO check before a
+       dynamic type change check.
+
 2012-06-29  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree-eh.c (lower_try_finally_switch): Really put the location of the
index 7ccd5ba..0064229 100644 (file)
@@ -865,8 +865,8 @@ compute_known_type_jump_func (tree op, struct ipa_jump_func *jfunc,
       || is_global_var (base))
     return;
 
-  if (detect_type_change (op, base, call, jfunc, offset)
-      || !TYPE_BINFO (TREE_TYPE (base)))
+  if (!TYPE_BINFO (TREE_TYPE (base))
+      || detect_type_change (op, base, call, jfunc, offset))
     return;
 
   jfunc->type = IPA_JF_KNOWN_TYPE;