From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32753 invoked by alias); 28 Jun 2011 18:27:11 -0000 Received: (qmail 32744 invoked by uid 22791); 28 Jun 2011 18:27:11 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jun 2011 18:26:56 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/46261] avr-gcc: Segfaults when compiled with the -mint8 option X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 28 Jun 2011 18:27:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg02764.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46261 --- Comment #17 from Georg-Johann Lay 2011-06-28 18:26:26 UTC --- Instead of defining CHAR16_TYPE, I think it's preferred to define UINT_LEAST16_TYPE appropriately and use logic in defaults.h so that defaults.h need not to be changed. CHAR16_TYPE is not used in many places, and it appears that defaults.h is included after tm.h. UINT_LEAST16_TYPE comes from config/newlib-stdint.h which is merged into avr headers in config.gcc. So a fix inside AVR sandbox could be: A) Include a new file, say avr/stdint.h, instead of newlib-stdint.h. or B) Include newlib-stdint.h prior to avr.h and override as needed. IMO A) is best because almost anything will have to be overwritten to render -min8 functional again. Moreover, note independant of this PR, that newlib-stdint.h makes some definitions that are not correct for AVR like #define SIG_ATOMIC_TYPE "int" // should be "char" for AVR So it's desired to have AVR-specific stdint.h, anyway. The major drawback of -mint8 is that it's not covered by the testsuite at all -- like most other AVR gadgets (ISR, progmem, ...) If maintainers are willing to support this, I am sure someone will supply according patch. Johann