[Bug target/14798] New: In case of SH target with -O2 option #pragma interrupt doesn't get resetted.

anilp1 at kpitcummins dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 31 11:11:00 GMT 2004


Hi,

I am using GCC 3.4 snapshot dated 17-03-2004.Please find following testcase 
which to produce the bug. 

test.c
*************************************************************
#pragma interrupt
void isr()
{
}
void delay(int a)
{
}
int main()
{
  return 0;
}
*************************************************************
Above test code is compiled with following options to gcc,
-m2e -S -O2

Since #pragma interrupt is written above "isr", so only "isr" should be treated 
as interrupt handler. But the functions mentioned below "isr" are also treated 
as interrupt handlers i.e. it saves all registers and generates "rte" instead 
of "rts". 

Compiler should treat only "isr" as interuupt handler.

Regards,
Anil Paranjpe

-- 
           Summary: In case of SH target with -O2 option #pragma interrupt
                    doesn't get resetted.
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anilp1 at kpitcummins dot com
                CC: anilp1 at kpitcummins dot com,gcc-bugs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh-unknown-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14798



More information about the Gcc-bugs mailing list