re PR c++/88261 (ICE: verify_gimple failed (error: non-trivial conversion at assignment))
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 7 Jan 2019 17:08:51 +0000 (17:08 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 7 Jan 2019 17:08:51 +0000 (17:08 +0000)
commit08c35030c7ece1f7034d9bf7b6d3e94138ad3c68
treea29a65864defc38e95dac82a895bf307d05df660
parent18fd43b95264a7244b50fd34cf983f4d78c208dc
re PR c++/88261 (ICE: verify_gimple failed (error: non-trivial conversion at assignment))

        PR c++/88261
        PR c++/69338
        PR c++/69696
        PR c++/69697
        * cp-tree.h (LOOKUP_ALLOW_FLEXARRAY_INIT): New flag value.
        * typeck2.c (digest_init_r): Raise an error for non-static
        initialization of a flexible array member.
        (process_init_constructor, massage_init_elt,
        process_init_constructor_array, process_init_constructor_record,
        process_init_constructor_union, process_init_constructor): Add the
        flags parameter and pass it thru.
        (store_init_value): Pass LOOKUP_ALLOW_FLEXARRAY_INIT parameter to
        digest_init_flags for static decls.

gcc/testsuite:
2019-01-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/88261
        PR c++/69338
        PR c++/69696
        PR c++/69697
        * gcc.dg/array-6.c: Move from here ...
        * c-c++-common/array-6.c: ... to here and add some more test coverage.
        * g++.dg/pr69338.C: New test.
        * g++.dg/pr69697.C: Likewise.
        * g++.dg/ext/flexary32.C: Likewise.
        * g++.dg/ext/flexary3.C: Adjust test.
        * g++.dg/ext/flexary12.C: Likewise.
        * g++.dg/ext/flexary13.C: Likewise.
        * g++.dg/ext/flexary15.C: Likewise.
        * g++.dg/warn/Wplacement-new-size-1.C: Likewise.
        * g++.dg/warn/Wplacement-new-size-2.C: Likewise.
        * g++.dg/warn/Wplacement-new-size-6.C: Likewise.

From-SVN: r267653
16 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/array-6.c [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/flexary12.C
gcc/testsuite/g++.dg/ext/flexary13.C
gcc/testsuite/g++.dg/ext/flexary15.C
gcc/testsuite/g++.dg/ext/flexary3.C
gcc/testsuite/g++.dg/ext/flexary32.C [new file with mode: 0644]
gcc/testsuite/g++.dg/pr69338.C [new file with mode: 0644]
gcc/testsuite/g++.dg/pr69697.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wplacement-new-size-1.C
gcc/testsuite/g++.dg/warn/Wplacement-new-size-2.C
gcc/testsuite/g++.dg/warn/Wplacement-new-size-6.C
gcc/testsuite/gcc.dg/array-6.c [deleted file]