public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46735] New: frv-elf --enable-werror-always build fails for 64 bit host
@ 2010-12-01  2:15 amylaar at gcc dot gnu.org
  2010-12-06 17:30 ` [Bug target/46735] " amylaar at gcc dot gnu.org
  2010-12-10  3:13 ` amylaar at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: amylaar at gcc dot gnu.org @ 2010-12-01  2:15 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: frv-elf --enable-werror-always build fails for 64 bit
                    host
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: amylaar@gcc.gnu.org
            Blocks: 44756
              Host: x86_64-linux-gnu
            Target: frv-*-*


../../../gcc/gcc/config/frv/predicates.md: In function
‘integer_register_operand_1’:
../../../gcc/gcc/config/frv/predicates.md:39:3: error: comparison is always
true due to limited range of data type [-Werror=type-limits]
../../../gcc/gcc/config/frv/predicates.md: In function
‘gpr_no_subreg_operand_1’:
../../../gcc/gcc/config/frv/predicates.md:76:3: error: comparison is always
true due to limited range of data type [-Werror=type-limits]
../../../gcc/gcc/config/frv/predicates.md: In function
‘gpr_or_int12_operand_1’:
../../../gcc/gcc/config/frv/predicates.md:132:3: error: comparison is always
true due to limited range of data type [-Werror=type-limits]
../../../gcc/gcc/config/frv/predicates.md: In function
‘gpr_or_int10_operand_1’:
../../../gcc/gcc/config/frv/predicates.md:189:3: error: comparison is always
true due to limited range of data type [-Werror=type-limits]
../../../gcc/gcc/config/frv/predicates.md: In function ‘gpr_or_int_operand_1’:
../../../gcc/gcc/config/frv/predicates.md:214:3: error: comparison is always
true due to limited range of data type [-Werror=type-limits]

REGNO yields an "unsigned" value, and this is tested with GPR_OR_PSEUDO_P.
The latter checks GPR_P, which in turn checks
IN_RANGE_P (R, GPR_FIRST, GPR_LAST) .

GPR_FIRST is #defined as 0.

IN_RANGE is defined like this:
#define IN_RANGE_P(VALUE, LOW, HIGH)                            \
  (   (((HOST_WIDE_INT)(VALUE)) >= (HOST_WIDE_INT)(LOW))        \
   && (((HOST_WIDE_INT)(VALUE)) <= ((HOST_WIDE_INT)(HIGH))))

on an ILP32 bit host, this means that the "unsigned" value from REGNO gets
casted to "int", thus the compiler does not know about the comparison result.

on a host with 32 bit unsigned and 64 bit long, however, the comparison is
always true.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-10  3:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01  2:15 [Bug target/46735] New: frv-elf --enable-werror-always build fails for 64 bit host amylaar at gcc dot gnu.org
2010-12-06 17:30 ` [Bug target/46735] " amylaar at gcc dot gnu.org
2010-12-10  3:13 ` amylaar at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).