From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1308 invoked by alias); 29 Dec 2002 23:16:02 -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 1277 invoked by uid 71); 29 Dec 2002 23:16:01 -0000 Resent-Date: 29 Dec 2002 23:16:01 -0000 Resent-Message-ID: <20021229231601.1276.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, sander_pool@pobox.com Received: (qmail 794 invoked by uid 61); 29 Dec 2002 23:12:09 -0000 Message-Id: <20021229231209.793.qmail@sources.redhat.com> Date: Sun, 29 Dec 2002 15:16:00 -0000 From: sander_pool@pobox.com Reply-To: sander_pool@pobox.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c/9100: illegal binary constant causes gcc to seg fault X-SW-Source: 2002-12/txt/msg01397.txt.bz2 List-Id: >Number: 9100 >Category: c >Synopsis: illegal binary constant causes gcc to seg fault >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Dec 29 15:16:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: sander_pool@pobox.com >Release: 3.3 >Organization: >Environment: Win32(Win2k), WinAVR release of AVR-gcc. >Description: I used an illegal binary constant declaration (0b111), this caused avr-gcc to crash: "-------- begin --------" avr-gcc --version avr-gcc (GCC) 3.3 20021209 (experimental) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "Size before:" text data bss dec hex filename 0 390 0 390 186 pin_test.hex avr-gcc -c -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -save-temps -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=pin_test.lst -mmcu=atmega128 -I. pin_test.c -o pin_test.o pin_test.c:40:61: invalid suffix "b11111000" on integer constant pin_test.c: In function `__vector_16': pin_test.c:40: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make: *** [pin_test.o] Error 1 C:\coding\sources\avr\pin_test> I will also report this on the avr-gcc forum but it seems to be a generic gcc problem (it should never crash). >How-To-Repeat: Compile the attached file with the options as shown in the description. Observe the error message. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="pin_test.i" Content-Disposition: inline; filename="pin_test.i" # 1 "pin_test.c" # 1 "" # 1 "" # 1 "pin_test.c" # 13 "pin_test.c" # 1 "c:/winavr/avr/include/avr/io.h" 1 3 # 75 "c:/winavr/avr/include/avr/io.h" 3 # 1 "c:/winavr/avr/include/avr/iom128.h" 1 3 # 46 "c:/winavr/avr/include/avr/iom128.h" 3 # 1 "c:/winavr/avr/include/avr/sfr_defs.h" 1 3 # 47 "c:/winavr/avr/include/avr/iom128.h" 2 3 # 76 "c:/winavr/avr/include/avr/io.h" 2 3 # 14 "pin_test.c" 2 # 1 "c:/winavr/avr/include/avr/interrupt.h" 1 3 # 101 "c:/winavr/avr/include/avr/interrupt.h" 3 extern inline void enable_external_int (unsigned char ints) { ((*(volatile unsigned char *)(((unsigned int) &((*(volatile unsigned char *)((0x39) + 0x20)))))) = (ints)); } # 119 "c:/winavr/avr/include/avr/interrupt.h" 3 extern inline void timer_enable_int (unsigned char ints) { ((*(volatile unsigned char *)(((unsigned int) &((*(volatile unsigned char *)((0x37) + 0x20)))))) = (ints)); } # 15 "pin_test.c" 2 # 1 "c:/winavr/avr/include/avr/signal.h" 1 3 # 16 "pin_test.c" 2 # 1 "../include/m128_master.h" 1 # 18 "pin_test.c" 2 volatile unsigned char led; volatile unsigned char blink; # 30 "pin_test.c" void __vector_16 (void) __attribute__ ((signal)); void __vector_16 (void) { # 40 "pin_test.c" if (((*(volatile unsigned char *)((0x13) + 0x20)) & 0b11111000) == 0) { if (blink) { (*(volatile unsigned char *)(0x62)) = 0; } else { (*(volatile unsigned char *)(0x62)) = (1<<((*(volatile unsigned char *)((0x13) + 0x20)) & 00111)); } } if (((*(volatile unsigned char *)((0x13) + 0x20)) & 0b1000) != 0) { if (blink) { (*(volatile unsigned char *)((0x18) + 0x20)) = 0; } else { (*(volatile unsigned char *)((0x18) + 0x20)) = (1<<((*(volatile unsigned char *)((0x13) + 0x20)) & 0b111)); } } if (((*(volatile unsigned char *)((0x13) + 0x20)) & 0b10000) != 0) { if (blink) { (*(volatile unsigned char *)((0x03) + 0x20)) = 0; } else { if ((*(volatile unsigned char *)((0x13) + 0x20)) > 2) { (*(volatile unsigned char *)((0x03) + 0x20)) = (1<<((*(volatile unsigned char *)((0x13) + 0x20)) & 0b111)); } } } (*(volatile unsigned char *)((0x12) + 0x20)) = ~led; led <<= 1; if (!led) led = (1<<6); (*(volatile unsigned char *)((0x32) + 0x20)) = 0; if (blink) { blink = 0; } else { blink =1; } } int main(void) { (*(volatile unsigned char *)((0x11) + 0x20)) = 0b1100000; (*(volatile unsigned char *)(0x61)) = 0xff; (*(volatile unsigned char *)((0x17) + 0x20)) = 0xff; (*(volatile unsigned char *)((0x02) + 0x20)) = 0xff; (*(volatile unsigned char *)((0x12) + 0x20)) = 0x00; (*(volatile unsigned char *)((0x18) + 0x20)) = 0x00; (*(volatile unsigned char *)((0x14) + 0x20)) = 0; (*(volatile unsigned char *)((0x15) + 0x20)) = 0xff; blink = 0; (*(volatile unsigned char *)((0x30) + 0x20)) = (1 << 3); (*(volatile unsigned char *)((0x32) + 0x20)) = 0; (*(volatile unsigned char *)((0x33) + 0x20)) = 5; (*(volatile unsigned char *)((0x37) + 0x20)) = (1 << 0); __asm__ __volatile__ ("sei" ::); for (;;) { } }