diff options
author | Jan Hubicka <jh@suse.cz> | 2008-06-18 21:07:51 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2008-06-18 19:07:51 +0000 |
commit | a7bf199e10bfe7a3ce99d86421632711de48bcc3 (patch) | |
tree | 3173e61d1d42583002338162fcf951ee703f626f | |
parent | 3f737aa91438a3586bca1452f1a5ee8de514a906 (diff) | |
download | gcc-a7bf199e10bfe7a3ce99d86421632711de48bcc3.zip gcc-a7bf199e10bfe7a3ce99d86421632711de48bcc3.tar.gz gcc-a7bf199e10bfe7a3ce99d86421632711de48bcc3.tar.bz2 |
c-opts.c (c_common_post_options): PCH is not compatible with no-unit-at-a-time.
* c-opts.c (c_common_post_options): PCH is not compatible with
no-unit-at-a-time.
* opts.c (handle_options): Enable unit-at-a-time at O0 along with
-fno-toplevel-reorder by default now.
* gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-3.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-4.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-5.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-6.c: Fix thinko in previous change.
* gcc.dg/weak/weak-7.c: Likewise.
From-SVN: r136903
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/c-opts.c | 3 | ||||
-rw-r--r-- | gcc/opts.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-2.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-3.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-4.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-5.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-6.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/weak/weak-7.c | 3 |
10 files changed, 38 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be29e2d..a86d857 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-06-18 Jan Hubicka <jh@suse.cz> + + * c-opts.c (c_common_post_options): PCH is not compatible with + no-unit-at-a-time. + * opts.c (handle_options): Enable unit-at-a-time at O0 along with + -fno-toplevel-reorder by default now. + 2008-06-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> PR documentation/30739 diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 2eef789..33d0e6b 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1038,6 +1038,9 @@ c_common_post_options (const char **pfilename) if (num_in_fnames > 1) flag_unit_at_a_time = 1; + if (pch_file && !flag_unit_at_a_time) + sorry ("Precompiled headers require -funit-at-a-time"); + /* Default to ObjC sjlj exception handling if NeXT runtime. */ if (flag_objc_sjlj_exceptions < 0) flag_objc_sjlj_exceptions = flag_next_runtime; @@ -822,6 +822,13 @@ decode_options (unsigned int argc, const char **argv) flag_merge_constants = 0; } + if (!no_unit_at_a_time_default) + { + flag_unit_at_a_time = 1; + if (!optimize) + flag_toplevel_reorder = 0; + } + if (optimize >= 1) { flag_defer_pop = 1; @@ -848,8 +855,6 @@ decode_options (unsigned int argc, const char **argv) flag_tree_fre = 1; flag_tree_copy_prop = 1; flag_tree_sink = 1; - if (!no_unit_at_a_time_default) - flag_unit_at_a_time = 1; if (!optimize_size) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6d2a795..bf4c5b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2008-06-16 Jan Hubicka <jh@suse.cz> + * gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty. + * gcc.dg/weak/weak-3.c: We no longer complain about incompatibilty. + * gcc.dg/weak/weak-4.c: We no longer complain about incompatibilty. + * gcc.dg/weak/weak-5.c: We no longer complain about incompatibilty. + * gcc.dg/weak/weak-6.c: Fix thinko in previous change. + * gcc.dg/weak/weak-7.c: Likewise. + +2008-06-16 Jan Hubicka <jh@suse.cz> + * gcc.dg/asm-wide-1.c: Do not require extra errors we output confused by earlier errors. * gcc.target/i386/sseregparm-2.c: Remove markers for errors not diff --git a/gcc/testsuite/gcc.dg/weak/weak-2.c b/gcc/testsuite/gcc.dg/weak/weak-2.c index 7f9cde5..973f4c2 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-2.c +++ b/gcc/testsuite/gcc.dg/weak/weak-2.c @@ -24,7 +24,7 @@ void * foo1b (void) return (void *)ffoo1b; } -extern void * ffoo1c (void); /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */ +extern void * ffoo1c (void); void * foo1c (void) { return (void *)ffoo1c; diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c index 21e5fa0..748bd23 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-3.c +++ b/gcc/testsuite/gcc.dg/weak/weak-3.c @@ -34,7 +34,7 @@ void * foo1c (void) { return (void *)ffoo1c; } -extern void * ffoo1c (void) __attribute__((weak)); /* { dg-warning "weak declaration" "weak declaration" } */ +extern void * ffoo1c (void) __attribute__((weak)); int ffoo1d (void); @@ -59,7 +59,7 @@ void * foo1f (void) return 0; } void * ffoox1f (void) { return (void *)0; } -extern void * ffoo1f (void) __attribute__((weak, alias ("ffoox1f"))); /* { dg-warning "weak declaration" "weak declaration" } */ +extern void * ffoo1f (void) __attribute__((weak, alias ("ffoox1f"))); extern void * ffoo1g (void); diff --git a/gcc/testsuite/gcc.dg/weak/weak-4.c b/gcc/testsuite/gcc.dg/weak/weak-4.c index 622a1c6..cd8a1e9 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-4.c +++ b/gcc/testsuite/gcc.dg/weak/weak-4.c @@ -32,7 +32,7 @@ void * foo1b (void) } -extern int vfoo1c; /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */ +extern int vfoo1c; void * foo1c (void) { return (void *)&vfoo1c; @@ -64,7 +64,7 @@ void * foo1f (void) #pragma weak vfoo1f -extern int vfoo1g; /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */ +extern int vfoo1g; void * foo1g (void) { return (void *)&vfoo1g; diff --git a/gcc/testsuite/gcc.dg/weak/weak-5.c b/gcc/testsuite/gcc.dg/weak/weak-5.c index a8aca28..e82792a 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-5.c +++ b/gcc/testsuite/gcc.dg/weak/weak-5.c @@ -39,7 +39,7 @@ void * foo1c (void) { return (void *)&vfoo1c; } -extern int vfoo1c __attribute__((weak)); /* { dg-warning "unspecified behavior" } */ +extern int vfoo1c __attribute__((weak)); extern int vfoo1d __attribute__((weak)); @@ -63,7 +63,7 @@ void * foo1f (void) { return (void *)&vfoo1f; } -extern int vfoo1f __attribute__((weak)); /* { dg-warning "unspecified behavior" } */ +extern int vfoo1f __attribute__((weak)); extern int vfoo1g; @@ -71,7 +71,7 @@ void * foo1g (void) { return (void *)&vfoo1g; } -int vfoo1g __attribute__((weak)); /* { dg-warning "unspecified behavior" } */ +int vfoo1g __attribute__((weak)); extern int vfoo1h __attribute__((weak)); diff --git a/gcc/testsuite/gcc.dg/weak/weak-6.c b/gcc/testsuite/gcc.dg/weak/weak-6.c index 3a660f7..6fa0d66 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-6.c +++ b/gcc/testsuite/gcc.dg/weak/weak-6.c @@ -2,5 +2,6 @@ /* { dg-require-weak "" } */ extern void * foo (void); -void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */ +void * foo (void) { return (void *)foo; } +/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */ #pragma weak foo diff --git a/gcc/testsuite/gcc.dg/weak/weak-7.c b/gcc/testsuite/gcc.dg/weak/weak-7.c index 031f830..07c03bc97 100644 --- a/gcc/testsuite/gcc.dg/weak/weak-7.c +++ b/gcc/testsuite/gcc.dg/weak/weak-7.c @@ -2,5 +2,6 @@ /* { dg-require-weak "" } */ extern void * foo (void); -void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */ +void * foo (void) { return (void *)foo; } +/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */ extern void * foo (void) __attribute__((weak)); |