re PR middle-end/32931 (FORALL and WHERE give an ICE with -m64)

2007-11-04  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/32931
        * fold-const.c (fold_binary <case EQ_EXPR>): Convert the inner type
        for TRUTH_NOT_EXPR to type.

2007-11-04  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/32931
        * gfortran.fortran-torture/compile/forall-1.f90: New testcase.

From-SVN: r129886
This commit is contained in:
Andrew Pinski 2007-11-04 11:04:49 -08:00 committed by Andrew Pinski
parent 7284a19735
commit 4c85a3da5f
4 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2007-11-04 Andrew Pinski <pinskia@gmail.com>
PR middle-end/32931
* fold-const.c (fold_binary <case EQ_EXPR>): Convert the inner type
for TRUTH_NOT_EXPR to type.
2007-11-04 Gerald Pfeifer <gerald@pfeifer.com>
* doc/contrib.texi (Contributors): Add Manuel Lopez-Ibanez.

View File

@ -11709,12 +11709,12 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1)
/* bool_var != 1 becomes !bool_var. */
if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_onep (arg1)
&& code == NE_EXPR)
return fold_build1 (TRUTH_NOT_EXPR, type, arg0);
return fold_build1 (TRUTH_NOT_EXPR, type, fold_convert (type, arg0));
/* bool_var == 0 becomes !bool_var. */
if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_zerop (arg1)
&& code == EQ_EXPR)
return fold_build1 (TRUTH_NOT_EXPR, type, arg0);
return fold_build1 (TRUTH_NOT_EXPR, type, fold_convert (type, arg0));
/* If this is an equality comparison of the address of two non-weak,
unaliased symbols neither of which are extern (since we do not

View File

@ -1,3 +1,8 @@
2007-11-04 Andrew Pinski <pinskia@gmail.com>
PR middle-end/32931
* gfortran.fortran-torture/compile/forall-1.f90: New testcase.
2007-11-04 David Edelsohn <edelsohn@gnu.org>
* g++.dg/cpp/_Pragma1.C: Disable on AIX.

View File

@ -0,0 +1,7 @@
integer i, a(1)
logical(kind=8) s(1)
s = .true.
a = 42
forall (i=1:1, .not. s(1)) a(i) = 0
end