[PATCH] Improve dump files for SRA early candidate check

Eric Botcazou ebotcazou@adacore.com
Thu Jun 23 06:30:00 GMT 2011


> +	    if (!host_integerp (DECL_FIELD_OFFSET (fld), 1))
> +	      {
> +		*msg = "structure field offset not host integer"; /* ??? */
> +		return true;
> +	      }

Offsets can be variable, like sizes, in Ada for example.

>        if (TYPE_VOLATILE (et))
> -	return true;
> +	{
> +	  *msg = "array type is volatile";
> +	  return true;
> +	}

"element type is volatile"

> +      if (!COMPLETE_TYPE_P (type))
> +        {
> +          reject (var, "is not complete");
> +	  continue;
> +        }

"has incomplete type" is better I think

> +      if (!host_integerp (TYPE_SIZE (type), 1))
> +        {
> +          reject (var, "not host integer");
> +	  continue;
> +        }

missing "type size"

> +      if (tree_low_cst (TYPE_SIZE (type), 1) == 0)
> +        {
> +          reject (var, "tree_low_cst is zero"); /* what is that? */
> +          continue;
> +        }

This is equivalent to saying that the type size is zero.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list