diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 23:14:56 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 23:14:56 +0000 |
commit | 486a4fb1cb640cda30503438f224fed3fcd07d93 (patch) | |
tree | 9e8832c953e2949ac3886a66da6c7b9bf9d3766d /gcc | |
parent | 754013ef76c46bc7f62351c3503755dda755b066 (diff) | |
download | gcc-486a4fb1cb640cda30503438f224fed3fcd07d93.tar.gz |
Revert untested varasm.c change
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/init/static-init2.C | 3 | ||||
-rw-r--r-- | gcc/varasm.c | 10 |
4 files changed, 2 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d7fe5ff3a0..38a62e2fa0f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,3 @@ -2009-11-04 Jason Merrill <jason@redhat.com> - - PR c++/36912 - * varasm.c (initializer_constant_valid_p): A PLUS_EXPR - or MINUS_EXPR of REAL_TYPE is not a valid constant initializer. - (output_constant): Avoid crash after error. - 2009-11-04 Eric Botcazou <ebotcazou@adacore.com> PR target/10127 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b65593ed0f9..61f8450e081 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,10 +1,5 @@ 2009-11-04 Jason Merrill <jason@redhat.com> - PR c++/36912 - * g++.dg/init/static-init2.C: New. - -2009-11-04 Jason Merrill <jason@redhat.com> - PR c++/39413 * g++.dg/template/overload11.C: New. * g++.dg/template/nested3.C: Adjust. diff --git a/gcc/testsuite/g++.dg/init/static-init2.C b/gcc/testsuite/g++.dg/init/static-init2.C deleted file mode 100644 index 34bf2b2388b..00000000000 --- a/gcc/testsuite/g++.dg/init/static-init2.C +++ /dev/null @@ -1,3 +0,0 @@ -// PR c++/36912 -// { dg-options -frounding-math } -const double c = .1, d = c+1; diff --git a/gcc/varasm.c b/gcc/varasm.c index c9953d128da..b6ff4ae149d 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4322,10 +4322,6 @@ initializer_constant_valid_p (tree value, tree endtype) case POINTER_PLUS_EXPR: case PLUS_EXPR: - /* Any valid floating-point constants will have been folded by now; - with -frounding-math we hit this with addition of two constants. */ - if (TREE_CODE (endtype) == REAL_TYPE) - return NULL_TREE; if (! INTEGRAL_TYPE_P (endtype) || TYPE_PRECISION (endtype) >= int_or_pointer_precision (TREE_TYPE (value))) @@ -4349,8 +4345,6 @@ initializer_constant_valid_p (tree value, tree endtype) break; case MINUS_EXPR: - if (TREE_CODE (endtype) == REAL_TYPE) - return NULL_TREE; if (! INTEGRAL_TYPE_P (endtype) || TYPE_PRECISION (endtype) >= int_or_pointer_precision (TREE_TYPE (value))) @@ -4566,8 +4560,8 @@ output_constant (tree exp, unsigned HOST_WIDE_INT size, unsigned int align) case REAL_TYPE: if (TREE_CODE (exp) != REAL_CST) error ("initializer for floating value is not a floating constant"); - else - assemble_real (TREE_REAL_CST (exp), TYPE_MODE (TREE_TYPE (exp)), align); + + assemble_real (TREE_REAL_CST (exp), TYPE_MODE (TREE_TYPE (exp)), align); break; case COMPLEX_TYPE: |