diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-28 09:39:56 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-07-28 09:39:56 -0400 |
commit | 185496bb2b6bd071b15c42c681b0c3d60390bce0 (patch) | |
tree | 3dd6c2d62ee80100a567b6c1fd2b3224f21f482e | |
parent | ba11c17994a5aba402252e4a7d0e5c91cad0aea9 (diff) | |
download | gcc-185496bb2b6bd071b15c42c681b0c3d60390bce0.zip gcc-185496bb2b6bd071b15c42c681b0c3d60390bce0.tar.gz gcc-185496bb2b6bd071b15c42c681b0c3d60390bce0.tar.bz2 |
(DO_GLOBAL_DTORS_BODY): Use an asm statement to keep the optimizer
from deleting an assignment that it is dead.
From-SVN: r10187
-rw-r--r-- | gcc/config/pa/pa.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 3f1504b..485dbbc 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -2190,13 +2190,17 @@ extern void hppa_encode_label (); #endif /* We want __gcc_plt_call to appear in every program built by - gcc, so we make a reference to it out of __main. */ + gcc, so we make a reference to it out of __main. + We use the asm statement to fool the optimizer into not + removing the dead (but important) initialization of + REFERENCE. */ + #define DO_GLOBAL_DTORS_BODY \ do { \ extern void __gcc_plt_call (); \ void (*reference)() = &__gcc_plt_call; \ func_ptr *p; \ + __asm__ ("" : : "r" (reference)); \ for (p = __DTOR_LIST__ + 1; *p; ) \ (*p++) (); \ } while (0) - |