This is the mail archive of the gcc-bugs@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]

[Bug optimization/14669] [3.4/3.5 Regression] Wrong code with -O for enum values expression E4 <= t && t <= E6


------- Additional Comments From kazu at cs dot umass dot edu  2004-03-21 23:06 -------
Here is what the toplevel (that is, not recursive part) fold is doing:
The left hand side is without Roger's patch.
The right hand side is with Roger's patch.

original-----------						original-----------
 <truth_andif_expr 						 <truth_andif_expr 
    type <boolean_type  bool unsigned QI			    type <boolean_type  bool unsigned QI
        size <integer_cst  constant 8>				        size <integer_cst  constant 8>
        unit size <integer_cst  constant 1>			        unit size <integer_cst 
constant 1>
        align 8 symtab 0 alias set -1 precision 1 min <intege	        align 8
symtab 0 alias set -1 precision 1 min <intege
   								   
    arg 0 <gt_expr  type <boolean_type  bool>			    arg 0 <gt_expr  type
<boolean_type  bool>
       								       
        arg 0 <var_decl  t type <enumeral_type  ActionType>	        arg 0
<var_decl  t type <enumeral_type  ActionType>
            used tree_1 tree_2 SI file pr14669-1.c line 11	            used
tree_1 tree_2 SI file pr14669-1.c line 11
            size <integer_cst  constant 32>			            size <integer_cst 
constant 32>
            unit size <integer_cst  constant 4>			            unit size
<integer_cst  constant 4>
            align 32 context <function_decl  main> initial <i	            align
32 context <function_decl  main> initial <i
        arg 1 <integer_cst  constant 0>>			        arg 1 <integer_cst  constant 0>>
    arg 1 <le_expr  type <boolean_type  bool>			    arg 1 <le_expr  type
<boolean_type  bool>
        arg 0 <var_decl  t>					        arg 0 <var_decl  t>
        arg 1 <integer_cst  constant 2>>>			        arg 1 <integer_cst  constant
2>>>
folded-------------						folded-------------
 <le_expr 							 <le_expr 
    type <boolean_type  bool unsigned QI			    type <boolean_type  bool unsigned QI
        size <integer_cst  constant 8>				        size <integer_cst  constant 8>
        unit size <integer_cst  constant 1>			        unit size <integer_cst 
constant 1>
        align 8 symtab 0 alias set -1 precision 1 min <intege	        align 8
symtab 0 alias set -1 precision 1 min <intege
   								   
    arg 0 <convert_expr 				      |	    arg 0 <minus_expr 
        type <integer_type  unsigned int unsigned SI	      |	        type
<enumeral_type  ActionType SI
            size <integer_cst  constant 32>			            size <integer_cst 
constant 32>
            unit size <integer_cst  constant 4>			            unit size
<integer_cst  constant 4>
            align 32 symtab 0 alias set -1 precision 32 min < |	           
align 32 symtab 0 alias set -1 precision 3 min <i
							      >	            values <tree_list 
							      >	                purpose <identifier_node  EE
							      >	                bindings <>
							      >	                local bindings <(nil)>>
							      >	                value <integer_cst  constant -1>
							      >	                chain <tree_list 
							      >	                    purpose <identifier_node  E0
							      >	                    bindings <>
							      >	                    local bindings <(nil)>>
							      >	                    value <integer_cst  constant 0>
							      >	                    chain <tree_list 
							      >	                        purpose <identifier_node  E1
							      >	                        bindings <>
							      >	                        local bindings <(nil)>>
							      >	                        value <integer_cst  constant 1>
							      >	                        chain <tree_list  purpose <identifier
							      >	            chain <type_decl  ActionType>>
       								       
        arg 0 <minus_expr  type <enumeral_type  ActionType>   |	        arg 0
<var_decl  t type <enumeral_type  ActionType>
            arg 0 <var_decl  t>				      |	            used tree_1 tree_2 SI
file pr14669-1.c line 11 si
            arg 1 <integer_cst  constant 1>>>		      |	            align 32
context <function_decl  main> initial <i
    arg 1 <integer_cst  type <integer_type  unsigned int> con |	        arg 1
<integer_cst  constant 1>>
							      >	    arg 1 <integer_cst  type <enumeral_type  ActionType> cons
original-----------						original-----------
 <cleanup_point_expr 						 <cleanup_point_expr 
    type <boolean_type  bool unsigned QI			    type <boolean_type  bool unsigned QI
        size <integer_cst  constant 8>				        size <integer_cst  constant 8>
        unit size <integer_cst  constant 1>			        unit size <integer_cst 
constant 1>
        align 8 symtab 0 alias set -1 precision 1 min <intege	        align 8
symtab 0 alias set -1 precision 1 min <intege
   								   
    arg 0 <le_expr  type <boolean_type  bool>			    arg 0 <le_expr  type
<boolean_type  bool>
       								       
        arg 0 <convert_expr  type <integer_type  unsigned int |	        arg 0
<minus_expr  type <enumeral_type  ActionType>
           						      |	            arg 0 <var_decl  t>
            arg 0 <minus_expr  type <enumeral_type  ActionTyp |	            arg
1 <integer_cst  constant 1>>
                arg 0 <var_decl  t>			      <
                arg 1 <integer_cst  constant 1>>>	      <
        arg 1 <integer_cst  constant 1>>>			        arg 1 <integer_cst  constant
1>>>
folded-------------						folded-------------
 <le_expr 							 <le_expr 
    type <boolean_type  bool unsigned QI			    type <boolean_type  bool unsigned QI
        size <integer_cst  constant 8>				        size <integer_cst  constant 8>
        unit size <integer_cst  constant 1>			        unit size <integer_cst 
constant 1>
        align 8 symtab 0 alias set -1 precision 1 min <intege	        align 8
symtab 0 alias set -1 precision 1 min <intege
   								   
    arg 0 <convert_expr 				      |	    arg 0 <minus_expr 
        type <integer_type  unsigned int unsigned SI	      |	        type
<enumeral_type  ActionType SI
            size <integer_cst  constant 32>			            size <integer_cst 
constant 32>
            unit size <integer_cst  constant 4>			            unit size
<integer_cst  constant 4>
            align 32 symtab 0 alias set -1 precision 32 min < |	           
align 32 symtab 0 alias set -1 precision 3 min <i
							      >	            values <tree_list 
							      >	                purpose <identifier_node  EE
							      >	                bindings <>
							      >	                local bindings <(nil)>>
							      >	                value <integer_cst  constant -1>
							      >	                chain <tree_list 
							      >	                    purpose <identifier_node  E0
							      >	                    bindings <>
							      >	                    local bindings <(nil)>>
							      >	                    value <integer_cst  constant 0>
							      >	                    chain <tree_list 
							      >	                        purpose <identifier_node  E1
							      >	                        bindings <>
							      >	                        local bindings <(nil)>>
							      >	                        value <integer_cst  constant 1>
							      >	                        chain <tree_list  purpose <identifier
							      >	            chain <type_decl  ActionType>>
       								       
        arg 0 <minus_expr  type <enumeral_type  ActionType>   |	        arg 0
<var_decl  t type <enumeral_type  ActionType>
            arg 0 <var_decl  t>				      |	            used tree_1 tree_2 SI
file pr14669-1.c line 11 si
            arg 1 <integer_cst  constant 1>>>		      |	            align 32
context <function_decl  main> initial <i
    arg 1 <integer_cst  type <integer_type  unsigned int> con |	        arg 1
<integer_cst  constant 1>>
							      >	    arg 1 <integer_cst  type <enumeral_type  ActionType> cons



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14669


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