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

* [Bug target/46735] frv-elf --enable-werror-always build fails for 64 bit host
  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 ` amylaar at gcc dot gnu.org
  2010-12-10  3:13 ` amylaar at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: amylaar at gcc dot gnu.org @ 2010-12-06 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2010-12-06 17:30:00 UTC ---
Author: amylaar
Date: Mon Dec  6 17:29:56 2010
New Revision: 167508

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167508
Log:
    PR target/46735
    * config/frv/predicates.md (gpr_or_int12_operand): Use IN_RANGE.
    (gpr_fpr_or_int12_operand, gpr_or_int10_operand): Likewise.
    (int12_operand, int_2word_operand, uint16_operand): Likewise.
    (fpr_or_int6_operand, int6_operand, int5_operand): Likewise.
    (uint5_operand, uint4_operand): Likewise.
    * config/frv/frv.h (IN_RANGE_P): Delete.
    (GPR_P, FPR_P, CC_P, ICC_P, FCC_P, CR_P, ICR_P, FCR_P): Use IN_RANGE.
    (ACC_P, ACCG_P, SPR_P, CONST_OK_FOR_I, CONST_OK_FOR_J): Likewise.
    (CONST_OK_FOR_L, CONST_OK_FOR_M, CONST_OK_FOR_N): Likewise.
    (CONST_OK_FOR_P): Likewise.
    * config/frv/frv.md (*movqicc_internal2_int): Likewise.
    (*movqicc_internal2_float, *movhicc_internal2_int): Likewise.
    (*movhicc_internal2_float, *movsicc_internal2_int): Likewise.
    (*movsicc_internal2_float, casesi): Likewise.
    * config/frv/frv.c (frv_frame_offset_rtx): Likewise.
    (frv_asm_output_mi_thunk, frv_legitimate_address_p_1): Likewise.
    (frv_emit_movsi, output_move_single, frv_emit_cond_move): Likewise.
    (frv_split_cond_move, frv_rtx_costs): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/frv/frv.c
    trunk/gcc/config/frv/frv.h
    trunk/gcc/config/frv/frv.md
    trunk/gcc/config/frv/predicates.md


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

* [Bug target/46735] frv-elf --enable-werror-always build fails for 64 bit host
  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
  1 sibling, 0 replies; 3+ messages in thread
From: amylaar at gcc dot gnu.org @ 2010-12-10  3:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2010-12-10 03:13:46 UTC ---
Patch has been applied to trunk.


^ 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).