aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2020-11-23 12:06:15 +0000
committerJozef Lawrynowicz <jozef.l@mittosystems.com>2020-11-23 12:06:15 +0000
commitfb8309d4abdcd4c8de07bd4c42e22d1e80471765 (patch)
treef2bbbaa05ee7dd1fc45845ae0d1277765032e6f5 /gcc/tree-vect-loop.c
parentb510765dedfec573c756cb1fcfcb5b0c3830c5e9 (diff)
downloadgcc-fb8309d4abdcd4c8de07bd4c42e22d1e80471765.zip
gcc-fb8309d4abdcd4c8de07bd4c42e22d1e80471765.tar.gz
gcc-fb8309d4abdcd4c8de07bd4c42e22d1e80471765.tar.bz2
cp/decl.c: Set DECL_INITIAL before attribute processing
Attribute handlers may want to examine DECL_INITIAL for a decl, to validate the attribute being applied. For C++, DECL_INITIAL is currently not set until cp_finish_decl, by which time attribute validation has already been performed. For msp430-elf this causes the "persistent" attribute to always be rejected for C++, since DECL_INITIAL must be non-null for the attribute to be applied to a decl. This patch ensures DECL_INITIAL is set for initialized decls early in start_decl, before attribute handlers run. This allows the initialization status of the decl to be examined by the handlers. DECL_INITIAL must be restored to it's initial value after attribute validation is performed, so as to not interfere with later decl processing. gcc/cp/ChangeLog: * decl.c (start_decl): Set DECL_INITIAL for initialized decls before attribute processing. gcc/testsuite/ChangeLog: * gcc.target/msp430/data-attributes-2.c: Adjust test. * g++.target/msp430/data-attributes.C: New test. * g++.target/msp430/msp430.exp: New test.
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions