public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "info dot gnu at rt-labs dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/39663]  New: mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with  -Os and -mthumb
Date: Mon, 06 Apr 2009 13:44:00 -0000	[thread overview]
Message-ID: <bug-39663-17536@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2009-04-06 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 13:44 info dot gnu at rt-labs dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-39663-17536@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).