diff options
author | Paul Brook <paul@codesourcery.com> | 2006-01-17 16:51:05 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-01-17 16:51:05 +0000 |
commit | 56f078c136c134b3b415ed1dd517e58bce9485ee (patch) | |
tree | 278ced803a2a59cd020f3c297cef56a8d4239054 /gcc/ada | |
parent | c570ce98de6f4910bc02fcc39bef5004ede14da1 (diff) |
Merge from gcc-4_1-branch revision 109820.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/sourcerygxx-4_1@109825 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/ada/misc.c | 19 | ||||
-rw-r--r-- | gcc/ada/s-osinte-linux-hppa.ads | 2 |
3 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8afd38c1b6f..04fc953b222 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,15 @@ +2005-12-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * s-osinte-linux-hppa.ads: Correct alignment of atomic_lock_t. + +2005-12-15 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/18659 + PR ada/18819 + * misc.c (tree_sra_requested): New global. + (gnat_init_options): Detect -ftree-sra. + (gnat_post_options): Enable Tree-SRA only if specifically requested. + 2005-11-21 Joel Sherrill <joel.sherrill@oarcorp.com> * socket.c: Add extern int h_errno for rtems since networking header diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index 0971808712c..e5dcd5b02e7 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -323,11 +323,15 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED) return 1; } +static bool tree_sra_requested = false; + /* Initialize for option processing. */ static unsigned int gnat_init_options (unsigned int argc, const char **argv) { + int i; + /* Initialize gnat_argv with save_argv size. */ gnat_argv = (char **) xmalloc ((argc + 1) * sizeof (argv[0])); gnat_argv[0] = xstrdup (argv[0]); /* name of the command */ @@ -339,6 +343,16 @@ gnat_init_options (unsigned int argc, const char **argv) /* Uninitialized really means uninitialized in Ada. */ flag_zero_initialized_in_bss = 0; + /* Find last option mentioning Tree-SRA. */ + for (i = argc - 1; i > 0; i--) + if (strcmp(argv[i], "-ftree-sra") == 0) + { + tree_sra_requested = true; + break; + } + else if (strcmp(argv[i], "-fno-tree-sra") == 0) + break; + return CL_Ada; } @@ -356,6 +370,11 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) flag_tree_salias = 0; + /* Do not enable Tree-SRA unless specifically requested as it + is known to badly interact with some Ada constructs. */ + if (!tree_sra_requested) + flag_tree_sra = 0; + return false; } diff --git a/gcc/ada/s-osinte-linux-hppa.ads b/gcc/ada/s-osinte-linux-hppa.ads index a04c636f1e8..ec7efd2feae 100644 --- a/gcc/ada/s-osinte-linux-hppa.ads +++ b/gcc/ada/s-osinte-linux-hppa.ads @@ -508,7 +508,7 @@ private lock : lock_array; end record; pragma Convention (C, atomic_lock_t); - for atomic_lock_t'Alignment use 8 * 16; + for atomic_lock_t'Alignment use 16; type struct_pthread_fast_lock is record spinlock : atomic_lock_t; |