From: Uros Bizjak Date: Tue, 17 Aug 2010 12:25:24 +0000 (+0200) Subject: re PR target/45296 (register long double ICE at -O2, -Os, -O3) X-Git-Tag: releases/gcc-4.6.0~4969 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c65142a27eb0e8574767fb05addc850811ea291;p=thirdparty%2Fgcc.git re PR target/45296 (register long double ICE at -O2, -Os, -O3) PR target/45296 * reginfo.c (globalize_reg): Reject stack registers. testsuite/ChangeLog: PR target/45296 * gcc.target/i386/pr45296.c: New test. From-SVN: r163303 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73462ffc54a6..29e5007c1622 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-08-17 Uros Bizjak + + PR target/45296 + * reginfo.c (globalize_reg): Reject stack registers. + 2010-08-17 Richard Guenther * tree-ssa-dom.c (struct edge_info): Use a VEC for the @@ -24,7 +29,7 @@ * c-decl.c (diagnose_uninitialized_cst_member): New function. (finish_decl): Use it to issue a -Wc++-compat warning about uninitialized const field in struct or union. - + (finish_struct): Use strip_array_types. 2010-08-17 Jakub Jelinek @@ -112,8 +117,7 @@ (decode_options): Update call to decode_cmdline_options_to_array. (print_filtered_help): Ignore driver-only options. (print_specific_help): Ignore CL_DRIVER. - (common_handle_option): Don't call print_specific_help for - CL_DRIVER. + (common_handle_option): Don't call print_specific_help for CL_DRIVER. * opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define. (CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON): Update values. diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 55d2b5b6f9d4..1510ce84ec5d 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -798,6 +798,14 @@ fix_register (const char *name, int fixed, int call_used) void globalize_reg (int i) { +#ifdef STACK_REGS + if (IN_RANGE (i, FIRST_STACK_REG, LAST_STACK_REG)) + { + error ("stack register used for global register variable"); + return; + } +#endif + if (fixed_regs[i] == 0 && no_global_reg_vars) error ("global register variable follows a function definition"); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e36e5bf729fb..a4c99b89d5b1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-08-17 Uros Bizjak + + PR target/45296 + * gcc.target/i386/pr45296.c: New test. + 2010-08-17 Kai Tietz * g++.dg/ext/uow-1.C: New. diff --git a/gcc/testsuite/gcc.target/i386/pr45296.c b/gcc/testsuite/gcc.target/i386/pr45296.c new file mode 100644 index 000000000000..307ee012aeb2 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr45296.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ + +register long double F80 asm("st"); /* { dg-error "stack register" } */