public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb @ 2009-04-06 13:44 info dot gnu at rt-labs dot com 2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: info dot gnu at rt-labs dot com @ 2009-04-06 13:44 UTC (permalink / raw) To: gcc-bugs Mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb for the code added below. Remove -mthumb and the output won't differ. Mingw hosted toolchain: Target: arm-elf Configured with: ../gcc-4.2.2/configure --target=arm-elf --prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c --disable-shared --disable-threads --disable-libssp --disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork --enable-multilib Thread model: single gcc version 4.2.2 Linux hosted toolchain: Target: arm-elf Configured with: ../gcc-4.2.2/configure --target=arm-elf --prefix=/proj/crossgcc/arm-elf --disable-nls --with-gnu-as --with-gnu-ld --enable-languages=c --disable-shared --disable-threads --disable-libssp --disable-__cxa_atexit --disable-libstdcxx-pch --enable-interwork --enable-multilib Thread model: single gcc version 4.2.2 arm-elf-gcc -Wall -mlittle-endian -mthumb -mthumb-interwork -Os -save-temps -c main.c main.c: typedef struct pic { unsigned int soft_set; unsigned int soft_clear; } pic_t; typedef struct isr { void (*func)(void *); void * arg; } isr_t; static volatile pic_t * const pSIC = (pic_t *)0xCA000000; static isr_t isr_table[32]; static void isr1 (void * arg) { /* Clear high priority IRQ */ pSIC->soft_clear = (1 << 0); } int main (void) { /* Install interrupt handlers */ isr_table[0].func = isr1; isr_table[0].arg = (void *)3; while(1); return (1); } regards Andreas -- Summary: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb Product: gcc Version: 4.2.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: info dot gnu at rt-labs dot com GCC build triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32 GCC host triplet: x86_64-unknown-linux-gnu, i686-pc-mingw32 GCC target triplet: arm-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/39663] mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb 2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com @ 2009-04-06 13:50 ` info dot gnu at rt-labs dot com 2009-04-06 13:51 ` info dot gnu at rt-labs dot com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: info dot gnu at rt-labs dot com @ 2009-04-06 13:50 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from info dot gnu at rt-labs dot com 2009-04-06 13:50 ------- Created an attachment (id=17595) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17595&action=view) source file that cause output difference -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/39663] mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb 2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com 2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com @ 2009-04-06 13:51 ` info dot gnu at rt-labs dot com 2009-04-07 0:39 ` hp at gcc dot gnu dot org 2009-04-07 16:52 ` info dot gnu at rt-labs dot com 3 siblings, 0 replies; 5+ messages in thread From: info dot gnu at rt-labs dot com @ 2009-04-06 13:51 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from info dot gnu at rt-labs dot com 2009-04-06 13:51 ------- Created an attachment (id=17596) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17596&action=view) sample makefile to genererate output difference -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/39663] mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb 2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com 2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com 2009-04-06 13:51 ` info dot gnu at rt-labs dot com @ 2009-04-07 0:39 ` hp at gcc dot gnu dot org 2009-04-07 16:52 ` info dot gnu at rt-labs dot com 3 siblings, 0 replies; 5+ messages in thread From: hp at gcc dot gnu dot org @ 2009-04-07 0:39 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from hp at gcc dot gnu dot org 2009-04-07 00:38 ------- The issue is rather 64-bit HOST_WIDE_INT host compared to 32-bit HOST_WIDE_INT host. (To prove wrong, compare with i686-unknown-linux-gnu instead x86_64-unknown-linux-gnu or configure and build with 'CC=gcc -m32'.) You *will* see some differences for code where 64-bit entities appear (maybe your pic_t and isr_t); known issue. I think there's another PR which to which this is a duplicate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/39663] mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb 2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com ` (2 preceding siblings ...) 2009-04-07 0:39 ` hp at gcc dot gnu dot org @ 2009-04-07 16:52 ` info dot gnu at rt-labs dot com 3 siblings, 0 replies; 5+ messages in thread From: info dot gnu at rt-labs dot com @ 2009-04-07 16:52 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from info dot gnu at rt-labs dot com 2009-04-07 16:52 ------- You're right, I tried both examples you mentioned, i'll point this to #35466 that seems to point out the problem you described about. *** This bug has been marked as a duplicate of 35466 *** -- info dot gnu at rt-labs dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39663 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-04-07 16:52 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-04-06 13:44 [Bug target/39663] New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os and -mthumb info dot gnu at rt-labs dot com 2009-04-06 13:50 ` [Bug target/39663] " info dot gnu at rt-labs dot com 2009-04-06 13:51 ` info dot gnu at rt-labs dot com 2009-04-07 0:39 ` hp at gcc dot gnu dot org 2009-04-07 16:52 ` info dot gnu at rt-labs dot com
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).