diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 17:01:49 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 17:01:49 +0000 |
commit | 0cea58f2e5cf0774e56207ea760b052903229547 (patch) | |
tree | af14099aa95d8b3737297a8c9682d9d10e110831 | |
parent | 3f899b097ac0188fc55c763afc1ccde5e2766027 (diff) | |
download | gcc-0cea58f2e5cf0774e56207ea760b052903229547.tar.gz |
Restore flag_pic in ix86_function_specific_restore
gcc/
PR target/59492
* config/i386/i386.c (ix86_function_specific_restore): Don't
change -fPIC.
2013-12-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/59492
* g++.dg/other/pr59492.C: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205989 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/pr59492.C | 18 |
4 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1419f14bb0a..4c68beb1efc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-12-14 H.J. Lu <hongjiu.lu@intel.com> + + PR target/59492 + * config/i386/i386.c (ix86_function_specific_restore): Don't + change -fPIC. + 2013-12-14 Eric Botcazou <ebotcazou@adacore.com> * var-tracking.c (add_stores): Fix oversight in latest commit. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2606b3bafa5..ecf5e0b1bc0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4337,6 +4337,9 @@ ix86_function_specific_restore (struct gcc_options *opts, unsigned int ix86_arch_mask; int i; + /* We don't change -fPIC. */ + opts->x_flag_pic = flag_pic; + ix86_arch = (enum processor_type) ptr->arch; ix86_schedule = (enum attr_cpu) ptr->schedule; ix86_tune = (enum processor_type) ptr->tune; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b5e0e83a9f..7820c932ddc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-12-14 H.J. Lu <hongjiu.lu@intel.com> + + PR target/59492 + * g++.dg/other/pr59492.C: New file. + 2013-12-14 Andreas Schwab <schwab@linux-m68k.org> * g++.dg/cilk-plus/cilk-plus.exp: Fix last change. diff --git a/gcc/testsuite/g++.dg/other/pr59492.C b/gcc/testsuite/g++.dg/other/pr59492.C new file mode 100644 index 00000000000..84bd25554f3 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr59492.C @@ -0,0 +1,18 @@ +// { dg-do assemble { target { { i?86-*-* x86_64-*-* } && fpic } } } +// { dg-options "-mx32 -fPIC" } +// { dg-require-ifunc "" } +// { dg-require-effective-target maybe_x32 } + +void +__throw_runtime_error(const char*) __attribute__((__noreturn__)); +unsigned int +__attribute__ ((target("rdrnd"))) +__x86_rdrand(void) +{ + unsigned int retries = 100; + unsigned int val; + while (__builtin_ia32_rdrand32_step(&val) == 0) + if (--retries == 0) + __throw_runtime_error(("random_device::__x86_rdrand(void)")); + return val; +} |