From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32620 invoked by alias); 10 May 2003 23:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 32604 invoked by uid 71); 10 May 2003 23:06:00 -0000 Date: Sat, 10 May 2003 23:06:00 -0000 Message-ID: <20030510230600.32603.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: John Bright Subject: Re: target/10733: Modulus bug Reply-To: John Bright X-SW-Source: 2003-05/txt/msg01021.txt.bz2 List-Id: The following reply was made to PR target/10733; it has been noted by GNATS. From: John Bright To: Dara Hazeghi , gcc-gnats@gcc.gnu.org Cc: Subject: Re: target/10733: Modulus bug Date: Sat, 10 May 2003 19:03:46 -0400 No problem. I'm new at dealing with gcc bugs, so I'm not always sure what you're asking for. I gather you want the output of avr-gcc -E? Assuming so, here it is: # 1 "test.c" # 1 "" # 1 "" # 1 "test.c" # 1 "/usr/avr/include/io.h" 1 3 # 20 "/usr/avr/include/io.h" 3 # 1 "/usr/avr/include/io-avr.h" 1 3 # 42 "/usr/avr/include/io-avr.h" 3 # 1 "/usr/avr/include/io8535.h" 1 3 # 43 "/usr/avr/include/io-avr.h" 2 3 # 21 "/usr/avr/include/io.h" 2 3 # 1 "/usr/avr/include/iomacros.h" 1 3 # 21 "/usr/avr/include/iomacros.h" 3 # 1 "/usr/avr/include/inttypes.h" 1 3 # 24 "/usr/avr/include/inttypes.h" 3 typedef signed char int8_t; typedef unsigned char uint8_t; typedef int int16_t; typedef unsigned int uint16_t; typedef long int32_t; typedef unsigned long uint32_t; typedef long long int64_t; typedef unsigned long long uint64_t; typedef int16_t intptr_t; typedef uint16_t uintptr_t; # 22 "/usr/avr/include/iomacros.h" 2 3 # 22 "/usr/avr/include/io.h" 2 3 # 2 "test.c" 2 int main(void) { unsigned char t1; t1=2; t1=(t1+40)%30; do { if ((__builtin_constant_p((0x17)) && ((0x17)) <= 0x40 + 0 - (1))) { if (__builtin_constant_p((0xff)) && ((0xff) == 0)) __asm__ __volatile__ ( "out %0,__zero_reg__" : : "M" ((uint8_t)(((0x17))-0)) ); else __asm__ __volatile__ ( "out %1,%0" : : "r" ((uint8_t)((0xff))), "M" ((uint8_t)(((0x17))-0)) ); } else (*((volatile uint8_t *)(((0x17)) - 0 + 0x20))) = (0xff); } while (0); do { if ((__builtin_constant_p((0x18)) && ((0x18)) <= 0x40 + 0 - (1))) { if (__builtin_constant_p((t1)) && ((t1) == 0)) __asm__ __volatile__ ( "out %0,__zero_reg__" : : "M" ((uint8_t)(((0x18))-0)) ); else __asm__ __volatile__ ( "out %1,%0" : : "r" ((uint8_t)((t1))), "M" ((uint8_t)(((0x18))-0)) ); } else (*((volatile uint8_t *)(((0x18)) - 0 + 0x20))) = (t1); } while (0); return(0); } As far as the assembly output, you just want me to compile the assembly and upload the result to my chip and see what happens? I can do that. Thanks, John Bright