On Fri, Apr 12, 2019 at 10:45:25AM -0600, Jeff Law wrote: > > gcc/ChangeLog: > > > > PR c/89797 > > * targhooks.c (default_vector_alignment): Avoid assuming > > argument fits in SHWI. > > * tree.h (TYPE_VECTOR_SUBPARTS): Avoid sign overflow in > > a shift expression. > > > > gcc/c-family/ChangeLog: > > > > PR c/88383 > > PR c/89288 > > PR c/89798 > > PR c/89797 > > * c-attribs.c (type_valid_for_vector_size): Detect excessively > > large sizes. > > (validate_attribute): Handle DECLs and expressions. > > (has_attribute): Handle types referenced by expressions. > > Avoid considering array attributes in ARRAY_REF expressions . > > > > gcc/cp/ChangeLog: > > > > PR c/88383 > > PR c/89288 > > * parser.c (cp_parser_has_attribute_expression): Handle assignment > > expressions. > > > > gcc/testsuite/ChangeLog: > > > > PR c/88383 > > PR c/89288 > > PR c/89798 > > PR c/89797 > > * c-c++-common/attributes-1.c: Adjust. > > * c-c++-common/builtin-has-attribute-6.c: New test. > > * c-c++-common/builtin-has-attribute-7.c: New test. > > * c-c++-common/builtin-has-attribute-4.c: Adjust expectations. > > * c-c++-common/builtin-has-attribute-6.c: New test.
New test twice for the same test? > > * gcc.dg/pr25559.c: Adjust. > > * gcc.dg/attr-vector_size.c: New test. > Per our offline discussion, I think this is OK with some documentation > updates to clarify expression handling. > > In particular can you adjust the docs to more clearly indicate that for > an expression, we look at the attributes of the type of the expression. > > With a suitable doc change of that nature, this is OK. Has the patch been tested at all? I see many new FAILs after the patch: make check-gcc check-c++-all RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} dg.exp='attributes-1.c builtin-has-attribute-*.c pr71574.c attr-vector_size.c pr25559.c'" FAIL: gcc.dg/attr-vector_size.c LP64 (test for errors, line 33) FAIL: gcc.dg/attr-vector_size.c LP64 (test for errors, line 60) FAIL: gcc.dg/attr-vector_size.c (test for excess errors) FAIL: gcc.dg/pr25559.c (test for errors, line 5) FAIL: gcc.dg/pr25559.c (test for excess errors) FAIL: c-c++-common/attributes-1.c -Wc++-compat (test for errors, line 17) FAIL: c-c++-common/attributes-1.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-4.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-6.c -Wc++-compat (internal compiler error) FAIL: c-c++-common/builtin-has-attribute-6.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-7.c -Wc++-compat (internal compiler error) FAIL: c-c++-common/builtin-has-attribute-7.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/pr71574.c -Wc++-compat (test for errors, line 14) FAIL: c-c++-common/pr71574.c -Wc++-compat (test for excess errors) for -m64, FAIL: gcc.dg/attr-vector_size.c (internal compiler error) FAIL: gcc.dg/attr-vector_size.c ILP32 (test for errors, line 37) FAIL: gcc.dg/attr-vector_size.c ILP32 (test for errors, line 39) FAIL: gcc.dg/attr-vector_size.c ILP32 (test for errors, line 64) FAIL: gcc.dg/attr-vector_size.c ILP32 (test for errors, line 66) FAIL: gcc.dg/attr-vector_size.c (test for excess errors) FAIL: gcc.dg/pr25559.c (test for errors, line 5) FAIL: gcc.dg/pr25559.c (test for excess errors) FAIL: c-c++-common/attributes-1.c -Wc++-compat (test for errors, line 17) FAIL: c-c++-common/attributes-1.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-4.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-6.c -Wc++-compat (internal compiler error) FAIL: c-c++-common/builtin-has-attribute-6.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/builtin-has-attribute-7.c -Wc++-compat (internal compiler error) FAIL: c-c++-common/builtin-has-attribute-7.c -Wc++-compat (test for excess errors) FAIL: c-c++-common/pr71574.c -Wc++-compat (test for errors, line 14) FAIL: c-c++-common/pr71574.c -Wc++-compat (test for excess errors) for -m32, and quite similar set for C++. Jakub