On Sat, Oct 24, 2015 at 02:10:26PM -0700, Cesar Philippidis wrote:
> +static tree
> +c_parser_oacc_shape_clause (c_parser *parser, omp_clause_code kind,
> +                         const char *str, tree list)
> +{
> +  const char *id = "num";
> +  tree ops[2] = { NULL_TREE, NULL_TREE }, c;
> +  location_t loc = c_parser_peek_token (parser)->location;
> +
> +  if (kind == OMP_CLAUSE_VECTOR)
> +    id = "length";
> +
> +  if (c_parser_next_token_is (parser, CPP_OPEN_PAREN))
> +    {
> +      c_parser_consume_token (parser);
> +
> +      do
> +     {
> +       c_token *next = c_parser_peek_token (parser);
> +       int idx = 0;
> +
> +       /* Gang static argument.  */
> +       if (kind == OMP_CLAUSE_GANG
> +           && c_parser_next_token_is_keyword (parser, RID_STATIC))
> +         {
> +           c_parser_consume_token (parser);
> +
> +           if (!c_parser_require (parser, CPP_COLON, "expected %<:%>"))
> +             goto cleanup_error;
> +
> +           idx = 1;
> +           if (ops[idx] != NULL_TREE )

Spurious space before ).

> +             {
> +               c_parser_error (parser, "too many %<static%> arguements");

Typo, arguments.

> +static tree
> +c_parser_oacc_simple_clause (c_parser *parser ATTRIBUTE_UNUSED,
> +                          enum omp_clause_code code, tree list)

Please remove the useless ATTRIBUTE_UNUSED, you are using that parameter
unconditionally in c_parser_peek_token (parser).

> +{
> +  check_no_duplicate_clause (list, code, omp_clause_code_name[code]);
> +
> +  tree c = build_omp_clause (c_parser_peek_token (parser)->location, code);
> +  OMP_CLAUSE_CHAIN (c) = list;
> +
> +  return c;
> +}
> +

> +int main ()
> +{
> +  int i;
> +  int v, w;
> +  int length, num;

Can you please initialize the v/w/length/num variables?

> +  #pragma acc kernels
> +#pragma acc loop gang(16, 24) /* { dg-error "unexpected argument" } */
> +  for (i = 0; i < 10; i++)

Missing indentation of the acc loop line.

Ok for trunk with those changes fixed.

        Jakub

Reply via email to