PATCH: [4.1/4.2 Regression]: Miscompiled FORTRAN program

Andrew Pinski pinskia@physics.uc.edu
Thu Feb 16 20:03:00 GMT 2006


On Feb 16, 2006, at 2:59 PM, Denis Nagorny wrote:

> James E Wilson wrote:
>> Yes, that is what I was suggesting.
>
> It's corrected and tested on ia64 and x86-64. I've attached new 
> version.
> Denis.
> + /* Return 1 if registers from REGNO to ENDREGNO are the subjects of a
> +    REG_INC note in insn INSN.  REGNO must refer to a hard register.  
> */
> +
> + static int
> + reg_inc_found_and_valid_p (unsigned int regno ATTRIBUTE_UNUSED,
> +                            unsigned int endregno ATTRIBUTE_UNUSED,
> +                            rtx insn ATTRIBUTE_UNUSED)
> + {
> + #ifdef AUTO_INC_DEC


What about defining the code this way:
#ifdef AUTO_INC_DEC
+ static int
+ reg_inc_found_and_valid_p (unsigned int regno,
+                            unsigned int endregno,
+                            rtx insn)
+ {

...
}
#else

#define reg_inc_found_and_valid_p(regno,endregno,insn) 0

#endif

So you can remove ugly ATTRIBUTE_UNUSED.

Thanks,
Andrew Pinski



More information about the Gcc mailing list