> @@ -108,7 +112,8 @@
>      tree Domain = TYPE_DOMAIN(type);
>      if (!Domain || !TYPE_MIN_VALUE(Domain) || !TYPE_MAX_VALUE(Domain))
>        return 0;
> -    if (TREE_CODE(TYPE_MIN_VALUE(Domain)) != INTEGER_CST ||
> +    if (TREE_CODE(TYPE_SIZE(type)) != INTEGER_CST ||
> +        TREE_CODE(TYPE_MIN_VALUE(Domain)) != INTEGER_CST ||
>          TREE_CODE(TYPE_MAX_VALUE(Domain)) != INTEGER_CST)
>        return 0;
>      if (TREE_INT_CST_LOW(TYPE_MAX_VALUE(Domain)) !=

Is this bit of the patch actually needed?  I can see how it
might be an optimization, in that you detect early if the
array component has non-constant size, and avoid a call to
isSingleElementStructOrArray.  But is it really needed for
correctness?

Thanks,

Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to