This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Bug target/14798] [3.4/3.5 Regression] [unit-at-a-time?] In case of SH target with -O2 option #pragma interrupt doesn't get resetted.
- From: "Anil Paranjape" <AnilP1 at KPITCummins dot com>
- To: <gcc-bugzilla at gcc dot gnu dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Jun 2004 12:15:57 +0530
- Subject: RE: [Bug target/14798] [3.4/3.5 Regression] [unit-at-a-time?] In case of SH target with -O2 option #pragma interrupt doesn't get resetted.
Hi all,
Please find patch updated with change suggested by Alexandre Oliva.
ChangeLog
2004-06-01 Anil Paranjpe <anilp1@kpitcummins.com>
* sh/sh.c (sh_insert_attributes) : Reset pragma_interrupt after inserting interrupt_handler attribute.
Patch text
******************************************************************
--- gcc-3.4.0/gcc/config/sh/sh.c.orig Sat May 1 16:40:57 2004
+++ gcc-3.4.0/gcc/config/sh/sh.c Tue Jun 1 10:16:26 2004
@@ -6687,13 +6687,14 @@ sh_insert_attributes (tree node, tree *a
if (! pragma_interrupt
|| TREE_CODE (node) != FUNCTION_DECL)
return;
-
/* We are only interested in fields. */
if (TREE_CODE_CLASS (TREE_CODE (node)) != 'd')
return;
/* Add a 'handle_interrupt' attribute. */
* attributes = tree_cons (get_identifier ("interrupt_handler"), NULL, * attributes);
+
+ pragma_interrupt = 0;
return;
}
******************************************************************
Please apply as i don't have access rights.
Regards,
Anil Paranjpe
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users.
Visit http://www.kpitgnutools.com for details.
Latest versions of KPIT GNU tools are released on June 1, 2004.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: aoliva at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org]
Sent: Tuesday, June 01, 2004 9:49 AM
To: Anil Paranjape
Subject: [Bug target/14798] [3.4/3.5 Regression] [unit-at-a-time?] In
case of SH target with -O2 option #pragma interrupt doesn't get
resetted.
------- Additional Comments From aoliva at gcc dot gnu dot org 2004-06-01 04:19 -------
Given the comment above the variable pragma_interrupt in sh.c, I assume the
behavior expected by Anil is the correct and intended behavior. Although the
patch correctly implements this, I'd prefer to clear the variable only after
successfully adding the interrupt_handler attribute, right before returning.
Patch approved with that change.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14798
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
You are on the CC list for the bug, or are watching someone who is.