This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH](ping) Fix PR15911, VRP for && and ||


On Mon, 23 Oct 2006, Richard Guenther wrote:

> On Sun, 22 Oct 2006, Richard Guenther wrote:
> 
> > On Sun, 22 Oct 2006, Diego Novillo wrote:
> > 
> > > Richard Guenther wrote on 10/22/06 09:57:
> > > 
> > > > 2006-04-25  Jeff Law  <law@redhat.com>
> > > >  Richard Guenther  <rguenther@suse.de>
> > > > 
> > > >  PR tree-optimization/15911
> > > >  * tree-vrp.c (extract_code_and_val_from_cond): New function.
> > > >  (register_edge_assert_for_1): Likewise.
> > > >  (register_edge_assert_for): Handle &&/&/||/| in conditionals.
> > > >  (find_conditional_asserts): Adjust for new function signature.
> > > >  (find_assert_locations): Likewise.
> > > >  
> > > Has this changed since May?
> > 
> > No, apart from the added documentation of a return value you noticed
> > back then.
> > 
> > > > +       /* We cannot handle float types at all and will ICE in
> > > > + 	 various ways down from compare_values.  */
> > > >
> > > May be not.  This comment still needs fixing.  s/We cannot/VRP does not/ 
> > >  Not handling float types is done on purpose.
> > 
> > Yeah.
> > 
> > > If nothing else changed, OK with that fix.
> 
> We're ICEing building aermod.f90 from Polyhedron due to this patch -
> I'm investigating.

This is what I am testing.

Richard.

2006-10-23  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (register_edge_assert_for_1): Fix wrong logic
	for TRUTH_NOT_EXPR.

	* gfortran.dg/vrp1.f90: New testcase.

Index: tree-vrp.c
===================================================================
*** tree-vrp.c	(revision 117967)
--- tree-vrp.c	(working copy)
*************** register_edge_assert_for_1 (tree op, enu
*** 2848,2857 ****
      }
    else if (TREE_CODE (rhs) == TRUTH_NOT_EXPR)
      {
!       invert = !invert;
!       /* Recurse, flipping the tense of INVERT.  */
        retval |= register_edge_assert_for_1 (TREE_OPERAND (rhs, 0),
! 					    invert, e, bsi);
      }
    else if (TREE_CODE (rhs) == SSA_NAME)
      {
--- 2848,2857 ----
      }
    else if (TREE_CODE (rhs) == TRUTH_NOT_EXPR)
      {
!       /* Recurse, flipping the tense of CODE.  */
!       code = invert_tree_comparison (code, false);
        retval |= register_edge_assert_for_1 (TREE_OPERAND (rhs, 0),
! 					    code, e, bsi);
      }
    else if (TREE_CODE (rhs) == SSA_NAME)
      {



      SUBROUTINE STONUM(STRVAR,LENGTH)
      CHARACTER STRVAR*(*) , CHK
      LOGICAL MEND , NMARK , MMARK , EMARK
      NMARK = .FALSE.
      MMARK = .FALSE.
      DO WHILE ( .NOT.MEND )
            IF ( CHK.GE.'0' .AND. CHK.LE.'9' ) THEN
               IF ( CHK.EQ.'E' ) THEN
                  NMARK = .TRUE.
               ELSEIF ( .NOT.MMARK .AND. CHK.EQ.'*' .AND. .NOT.NMARK )  &
     &                  THEN
                  MMARK = .TRUE.
               ENDIF
            ENDIF
      ENDDO
      END


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]