This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/35705] [4.3/4.4 Regression] Symbol address check eliminated by C frontend.
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2008 22:55:49 -0000
- Subject: [Bug middle-end/35705] [4.3/4.4 Regression] Symbol address check eliminated by C frontend.
- References: <bug-35705-11932@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from dave at hiauly1 dot hia dot nrc dot ca 2008-03-26 22:55 -------
Subject: Re: [4.3/4.4 Regression] Symbol address check eliminated by C
frontend.
> so I suppose you want to disable this optimization for addresses of functions.
Something like the following?
Index: fold-const.c
===================================================================
--- fold-const.c (revision 133621)
+++ fold-const.c (working copy)
@@ -9065,7 +9065,7 @@
}
}
- if (DECL_P (expr))
+ if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
return DECL_ALIGN_UNIT (expr);
}
else if (code == POINTER_PLUS_EXPR)
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35705