This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2008 15:00:57 -0000
- Subject: [Bug c++/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2
- References: <bug-36767-16437@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from jakub at gcc dot gnu dot org 2008-07-28 15:00 -------
There are unneeded {} pairs, when there is just one statement in for/if, you
should just write
if (something)
DECL_CONTEXT (x) = current_function_decl;
and similar for
for (.....)
if (something)
DECL_CONTEXT (var) = current_function_decl.
Also, I think it is unnecessary to pass current_function_decl as data to the
callback, current_function_decl is accessible in the callback too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36767