summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-27 15:49:23 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-27 15:49:23 +0000
commit28fbc04fb8014bee80c4dc870a1d5677cd8b9ddb (patch)
tree6202d439e8eccfb35cb0bd6d9cf4e61e9222cb64
parente829ba778995342e6ea259f6f871f96297792135 (diff)
downloadppe42-gcc-28fbc04fb8014bee80c4dc870a1d5677cd8b9ddb.tar.gz
ppe42-gcc-28fbc04fb8014bee80c4dc870a1d5677cd8b9ddb.zip
* c-common.c (get_priority): Add check for
SUPPORTS_INIT_PRIORITY. * lib/target-supports.exp (check_effective_target_init_priority): Remove Solaris special case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122378 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c9
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/lib/target-supports.exp7
4 files changed, 21 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a9070cc046f..bac6d56f54d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-27 Mark Mitchell <mark@codesourcery.com>
+
+ * c-common.c (get_priority): Add check for
+ SUPPORTS_INIT_PRIORITY.
+
2007-02-27 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (doloop_end): FAIL if counter reg isn't SImode.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 0cd4d1a8eb4..8d321a292f5 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4697,6 +4697,15 @@ get_priority (tree args, bool is_destructor)
if (!args)
return DEFAULT_INIT_PRIORITY;
+ if (!SUPPORTS_INIT_PRIORITY)
+ {
+ if (is_destructor)
+ error ("destructor priorities are not supported");
+ else
+ error ("constructor priorities are not supported");
+ return DEFAULT_INIT_PRIORITY;
+ }
+
arg = TREE_VALUE (args);
if (!host_integerp (arg, /*pos=*/0)
|| !INTEGRAL_TYPE_P (TREE_TYPE (arg)))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a6f8fb0a06e..cf07c57ad94 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-27 Mark Mitchell <mark@codesourcery.com>
+
+ * lib/target-supports.exp (check_effective_target_init_priority):
+ Remove Solaris special case.
+
2007-02-26 Geoffrey Keating <geoffk@apple.com>
* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Allow
@@ -35,7 +40,8 @@
* g++.dg/special/initp1.C: Likewise.
* g++.dg/special/ecos.exp: Remove code to detect availability of
constructor priorities.
- * lib/target-support.exp (target_init_priority): New function.
+ * lib/target-supports.exp (check_effective_target_init_priority):
+ New function.
2007-02-24 Jan Hubicka <jh@suse.cz>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 2682f8f4b7d..e205f47b3f4 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2093,13 +2093,6 @@ proc check_effective_target_dummy_wcsftime {} {
# supposed on this target.
proc check_effective_target_init_priority {} {
- # On Solaris2, initialization priorities are only supported with
- # GNU ld, but the compiler accepts them even when using Sun ld.
- # For more information, see PR 6482.
- if { [istarget *-solaris2*] } {
- return 1
- }
-
return [check_no_compiler_messages init_priority assembly "
void f() __attribute__((constructor (1000)));
void f() \{\}
OpenPOWER on IntegriCloud