This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve dump files for SRA early candidate check


> +	    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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]