diff options
author | Jan Hubicka <jh@suse.cz> | 2011-01-10 22:54:33 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-01-10 21:54:33 +0000 |
commit | 06c9eb5136fe0e778cc3a643131eba2a3dfb77a8 (patch) | |
tree | 6b65373a74635a6fc6d17e3e730f07357c92cc14 /gcc/lto-streamer-out.c | |
parent | b88e4ef16ca4ccaee24c9399977977e349cbe0cd (diff) | |
download | gcc-06c9eb5136fe0e778cc3a643131eba2a3dfb77a8.zip gcc-06c9eb5136fe0e778cc3a643131eba2a3dfb77a8.tar.gz gcc-06c9eb5136fe0e778cc3a643131eba2a3dfb77a8.tar.bz2 |
re PR lto/46083 (gcc.dg/initpri1.c FAILs with -flto/-fwhopr (attribute constructor/destructor doesn't work))
PR lto/46083
* lto-streamer-out.c (pack_ts_function_decl_value_fields): Store
DECL_FINI_PRIORITY.
* lto-streamer-in.c (unpack_ts_function_decl_value_fields):
Restore DECL_FINI_PRIORITY.
* gcc.dg/initpri3.c: New testcase.
From-SVN: r168642
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 781b257..82c2f6f 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -496,6 +496,8 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, DECL_DISREGARD_INLINE_LIMITS (expr), 1); bp_pack_value (bp, DECL_PURE_P (expr), 1); bp_pack_value (bp, DECL_LOOPING_CONST_OR_PURE_P (expr), 1); + if (DECL_STATIC_DESTRUCTOR (expr)) + bp_pack_value (bp, DECL_FINI_PRIORITY (expr), HOST_BITS_PER_SHORT); } |