[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-09 Thread renlin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

renlin at gcc dot gnu.org changed:

   What|Removed |Added

 Target|alpha-linux-gnu |alpha-linux-gnu,
   ||arm-none-linux-gnueabi
 CC||renlin at gcc dot gnu.org

--- Comment #1 from renlin at gcc dot gnu.org ---
I observed the same issue on arm-none-linux-gnueabi target


[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-09 Thread renlin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

renlin at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hp at gcc dot gnu.org

--- Comment #2 from renlin at gcc dot gnu.org ---
*** Bug 64552 has been marked as a duplicate of this bug. ***


[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-09 Thread sje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

Steve Ellcey  changed:

   What|Removed |Added

 CC||mliska at suse dot cz,
   ||sje at gcc dot gnu.org

--- Comment #3 from Steve Ellcey  ---
Looks like it is this patch based on the email in the thread.

https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00310.html


[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

Martin Liška  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #4 from Martin Liška  ---
Hello.

Sorry for such issue during Friday evening. The problem is that for target
compiler, target_option_default_node == NULL. I am not so familiar with options
if this is correct situation?

Anyway, following suggested patch return NULL as cl_target_option that compared
correctly:


diff --git a/gcc/tree.h b/gcc/tree.h
index e9af9bf..d3f13e8 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4678,6 +4678,10 @@ target_opts_for_fn (const_tree fndecl)
   tree fn_opts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
   if (fn_opts == NULL_TREE)
 fn_opts = target_option_default_node;
+
+  if (fn_opts == NULL_TREE)
+return NULL;
+
   return TREE_TARGET_OPTION (fn_opts);
 }


Martin

[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Mon Jan 12 09:02:33 2015
New Revision: 219449

URL: https://gcc.gnu.org/viewcvs?rev=219449&root=gcc&view=rev
Log:
PR ipa/64550

PR ipa/64551
PR ipa/64552
* ipa-icf.c (sem_function::equals_private): Use '&&' instead of
'||' to fix typo issue.

* gcc/tree.h (target_opts_for_fn): Check NULL_TREE since it can
accept and return NULL.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-icf.c
trunk/gcc/tree.h

[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Martin Liška  ---
Fixed.

[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-12 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

Uroš Bizjak  changed:

   What|Removed |Added

 CC||Hale.Wang at arm dot com

--- Comment #7 from Uroš Bizjak  ---
*** Bug 64564 has been marked as a duplicate of this bug. ***

[Bug ipa/64551] Segfault in target_opts_for_fn (from ipa_icf::sem_function::equals_private)

2015-01-12 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64551

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #8 from ktkachov at gcc dot gnu.org ---
*** Bug 64566 has been marked as a duplicate of this bug. ***