Hello Richard, et al., Attached please find a patch with the following changes:
1. Test-suite codes were moved to the appropriate location as suggested below And the following modifications that RTH mentioned in (http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01400.html) 2. ARRAY_NOTATION_TYPE is completely removed (from the location in tree, its definition and usage) 3. Generic.texi had documentation for ARRAY_NOTATION_REF. That is also removed. It is passing all the regression tests and not breaking/passing any other tests that were not already breaking/passing in the trunk. Here are the ChangeLog entries with the above updates reflected: gcc/ChangeLog 2013-05-24 Balaji V. Iyer <balaji.v.i...@intel.com> * doc/extend.texi (C Extensions): Added documentation about Cilk Plus array notation built-in reduction functions. * doc/passes.texi (Passes): Added documentation about changes done for Cilk Plus. * doc/invoke.texi (C Dialect Options): Added documentation about the -fcilkplus flag. * Makefile.in (C_COMMON_OBJS): Added c-family/array-notation-common.o. (BUILTINS_DEF): Depend on cilkplus.def. * builtins.def: Include cilkplus.def. Define DEF_CILKPLUS_BUILTIN. * builtin-types.def: Define BT_FN_INT_PTR_PTR_PTR. * cilkplus.def: New file. gcc/c-family/ChangeLog 2013-05-24 Balaji V. Iyer <balaji.v.i...@intel.com> * c-common.c (c_define_builtins): When cilkplus is enabled, the function array_notation_init_builtins is called. (c_common_init_ts): Added ARRAY_NOTATION_REF as typed. * c-common.def (ARRAY_NOTATION_REF): New tree. * c-common.h (build_array_notation_expr): New function declaration. (build_array_notation_ref): Likewise. (extract_sec_implicit_index_arg): New extern declaration. (is_sec_implicit_index_fn): Likewise. (ARRAY_NOTATION_CHECK): New define. (ARRAY_NOTATION_ARRAY): Likewise. (ARRAY_NOTATION_START): Likewise. (ARRAY_NOTATION_LENGTH): Likewise. (ARRAY_NOTATION_STRIDE): Likewise. * c-pretty-print.c (pp_c_postifix_expression): Added a new case for ARRAY_NOTATION_REF. (pp_c_expression): Likewise. * c.opt (flag_enable_cilkplus): New flag. * array-notation-common.c: New file. gcc/c/ChangeLog 2013-05-24 Balaji V. Iyer <balaji.v.i...@intel.com> * c-typeck.c (build_array_ref): Added a check to see if array's index is greater than one. If true, then emit an error. (build_function_call_vec): Exclude error reporting and checking for builtin array-notation functions. (convert_arguments): Likewise. (c_finish_return): Added a check for array notations as a return expression. If true, then emit an error. (c_finish_loop): Added a check for array notations in a loop condition. If true then emit an error. (lvalue_p): Added a ARRAY_NOTATION_REF case. (build_binary_op): Added a check for array notation expr inside op1 and op0. If present, we call another function to find correct type. * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o. * c-parser.c (c_parser_compound_statement): Check if array notation code is used in tree, if so, then transform them into appropriate C code. (c_parser_expr_no_commas): Check if array notation is used in LHS or RHS, if so, then build array notation expression instead of regular modify. (c_parser_postfix_expression_after_primary): Added a check for colon(s) after square braces, if so then handle it like an array notation. Also, break up array notations in unary op if found. (c_parser_direct_declarator_inner): Added a check for array notation. (c_parser_compound_statement): Added a check for array notation in a stmt. If one is present, then expand array notation expr. (c_parser_if_statement): Likewise. (c_parser_switch_statement): Added a check for array notations in a switch statement's condition. If true, then output an error. (c_parser_while_statement): Similarly, but for a while. (c_parser_do_statement): Similarly, but for a do-while. (c_parser_for_statement): Similarly, but for a for-loop. (c_parser_unary_expression): Check if array notation is used in a pre-increment or pre-decrement expression. If true, then expand them. (c_parser_array_notation): New function. * c-array-notation.c: New file. * c-tree.h (is_cilkplus_reduce_builtin): Protoize. gcc/testsuite/ChangeLog 2013-05-24 Balaji V. Iyer <balaji.v.i...@intel.com> * gcc.dg/cilk-plus/AN/array_test1.c: New test. * gcc.dg/cilk-plus/AN/array_test2.c: Ditto. * gcc.dg/cilk-plus/AN/array_test_ND.c: Ditto. * gcc.dg/cilk-plus/AN/builtin_func_double.c: Ditto. * gcc.dg/cilk-plus/AN/builtin_func_double2.c: Ditto. * gcc.dg/cilk-plus/AN/gather-scatter-errors.c: Ditto. * gcc.dg/cilk-plus/AN/if_test.c: Ditto. * gcc.dg/cilk-plus/AN/sec_implicit_ex.c: Ditto. * gcc.dg/cilk-plus/AN/decl-ptr-colon.c: Ditto. * gcc.dg/cilk-plus/AN/dimensionless-arrays.c: Ditto. * gcc.dg/cilk-plus/AN/fn_ptr.c: Ditto. * gcc.dg/cilk-plus/AN/fp_triplet_values.c: Ditto. * gcc.dg/cilk-plus/AN/gather-scatter.c: Ditto. * gcc.dg/cilk-plus/AN/misc.c: Ditto. * gcc.dg/cilk-plus/AN/parser_errors.c: Ditto. * gcc.dg/cilk-plus/AN/parser_errors2.c: Ditto. * gcc.dg/cilk-plus/AN/parser_errors3.c: Ditto. * gcc.dg/cilk-plus/AN/parser_errors4.c: Ditto. * gcc.dg/cilk-plus/AN/rank_mismatch.c: Ditto. * gcc.dg/cilk-plus/AN/rank_mismatch2.c: Ditto. * gcc.dg/cilk-plus/AN/rank_mismatch3.c: Ditto. * gcc.dg/cilk-plus/AN/sec_implicit.c: Ditto. * gcc.dg/cilk-plus/AN/sec_implicit2.c: Ditto. * gcc.dg/cilk-plus/AN/sec_reduce_max_min_ind.c: Ditto. * gcc.dg/cilk-plus/AN/tst_lngth.c: Ditto. * gcc.dg/cilk-plus/AN/vla.c: Ditto. * gcc.dg/cilk-plus/AN/an-if.c: Ditto. * gcc.dg/cilk-plus/AN/builtin_fn_custom.c: Ditto. * gcc.dg/cilk-plus/AN/builtin_fn_mutating.c: Ditto. * gcc.dg/cilk-plus/AN/comma_exp.c: Ditto. * gcc.dg/cilk-plus/AN/conditional.c: Ditto. * gcc.dg/cilk-plus/AN/exec-once.c: Ditto. * gcc.dg/cilk-plus/AN/exec-once2.c: Ditto. * gcc.dg/cilk-plus/AN/gather_scatter.c: Ditto. * gcc.dg/cilk-plus/AN/n-ptr-test.c: Ditto. * gcc.dg/cilk-plus/AN/side-effects-1.c: Ditto. * gcc.dg/cilk-plus/AN/test_builtin_return.c: Ditto. * gcc.dg/cilk-plus/AN/test_sec_limits.c: Ditto. * gcc.dg/cilk-plus/AN/cilkplus_AN_c.exp: New script. Is this OK for trunk? Thanks, Balaji V. Iyer. > -----Original Message----- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Jeff Law > Sent: Friday, May 24, 2013 12:21 PM > To: Iyer, Balaji V > Cc: Aldy Hernandez; Jakub Jelinek; Richard Henderson; 'Joseph S. Myers'; 'gcc- > patches' > Subject: Re: [PING]RE: [patch] cilkplus: Array notation for C patch > > On 05/23/2013 06:42 PM, Iyer, Balaji V wrote: > > > > I got all your responses and, if I remove the compile, execute and > > errors directories but keep cilk-plus and array notation, maybe even > > abbreviate array notation to "an", (in future cilk keywords to "ck", > > pragma simd to "ps" and elemental function to "ef"), will that be OK > > with everyone? We removed one directory and moved 3 scripts to 1, and > > with abbreviated subdirectories the ChangeLog lines won't be long. I > > really like to put all the cilk-plus tests in one location for C > > compiler so that if anyone wants to get them I can point to one > > location. > Seems like a reasonable compromise.. Works for me. I'll stop bikeshedding > :-) > > jeff
patch.txt.bz2
Description: patch.txt.bz2