diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-08-28 11:50:04 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-08-28 11:50:04 +0200 |
commit | 0b738568dad569012c12839d57721939ac8ef3f5 (patch) | |
tree | 86fe83018d696ab2099609448cb335ccab58e116 /gcc | |
parent | 71cca28908fd6715721704da2fe4f8929879cd86 (diff) | |
download | gcc-0b738568dad569012c12839d57721939ac8ef3f5.zip gcc-0b738568dad569012c12839d57721939ac8ef3f5.tar.gz gcc-0b738568dad569012c12839d57721939ac8ef3f5.tar.bz2 |
re PR middle-end/32370 (Segfault after rejecting bogus assembler)
PR middle-end/32370
* passes.c (init_optimization_passes): Move pass_df_finish
after pass_postreload sublist.
* gcc.dg/pr32370.c: New test.
From-SVN: r127856
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/passes.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr32370.c | 24 |
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3a9f3e..bc2e9be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2007-08-28 Jakub Jelinek <jakub@redhat.com> + PR middle-end/32370 + * passes.c (init_optimization_passes): Move pass_df_finish + after pass_postreload sublist. + PR rtl-optimization/33148 * simplify-rtx.c (simplify_unary_operation_1): Only optimize (neg (lt X 0)) if X has scalar int mode. diff --git a/gcc/passes.c b/gcc/passes.c index 1ec6b0a..1a34752 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -762,13 +762,13 @@ init_optimization_passes (void) NEXT_PASS (pass_machine_reorg); NEXT_PASS (pass_cleanup_barriers); NEXT_PASS (pass_delay_slots); - NEXT_PASS (pass_df_finish); NEXT_PASS (pass_split_for_shorten_branches); NEXT_PASS (pass_convert_to_eh_region_ranges); NEXT_PASS (pass_shorten_branches); NEXT_PASS (pass_set_nothrow_function_flags); NEXT_PASS (pass_final); } + NEXT_PASS (pass_df_finish); } NEXT_PASS (pass_clean_state); *p = NULL; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d496473..47ee5d7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2007-08-28 Jakub Jelinek <jakub@redhat.com> + PR middle-end/32370 + * gcc.dg/pr32370.c: New test. + PR rtl-optimization/33148 * gcc.c-torture/compile/20070827-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr32370.c b/gcc/testsuite/gcc.dg/pr32370.c new file mode 100644 index 0000000..18afde2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr32370.c @@ -0,0 +1,24 @@ +/* PR middle-end/32370 */ +/* { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */ +/* { dg-options "" { target ia64-*-* } } */ +/* { dg-options "-ffixed-esi" { target i?86-*-* x86_64-*-* } } */ + +#if defined __i386__ || defined __x86_64__ +# define C "=S" +#elif defined __ia64__ +# define C "=a" +#endif + +unsigned int +foo (unsigned long port) +{ + unsigned int v; + __asm__ __volatile__ ("" : C (v) : "Nd" (port)); /* { dg-error "while reloading\|has impossible" } */ + return v; +} + +void +bar (void) +{ + foo (0); +} |