This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14798] New: In case of SH target with -O2 option #pragma interrupt doesn't get resetted.
- From: "anilp1 at kpitcummins dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Mar 2004 11:11:40 -0000
- Subject: [Bug target/14798] New: In case of SH target with -O2 option #pragma interrupt doesn't get resetted.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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