This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve dump files for SRA early candidate check
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: gcc-patches at gcc dot gnu dot org, Andi Kleen <ak at linux dot intel dot com>
- Date: Thu, 23 Jun 2011 08:07:22 +0200
- Subject: Re: [PATCH] Improve dump files for SRA early candidate check
- References: <1308804883-17677-1-git-send-email-andi@firstfloor.org>
> + 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