[Bug target/77957] [6/7 Regression] Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64le

2016-11-05 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77957

--- Comment #4 from Segher Boessenkool  ---
It is on my "stage3" list.

[Bug target/77957] [6/7 Regression] Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64le

2016-11-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77957

--- Comment #3 from Jakub Jelinek  ---
This has been worked around on the trunk, but I haven't tracked status of the
actual bugfix (making sure that if we don't optimize away the .LCTOC0
reference, we emit that symbol).  Segher, do you remember if anything has been
checked in or not?

[Bug target/77957] [6/7 Regression] Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64le

2016-10-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77957

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Thu Oct 13 08:29:03 2016
New Revision: 241087

URL: https://gcc.gnu.org/viewcvs?rev=241087=gcc=rev
Log:
PR target/77957
* hooks.h (hook_tree_void_null): Declare.
* hooks.c (hook_tree_void_null): New function.
* langhooks.c (lhd_return_null_tree_v): Remove.
* langhooks-def.h (lhd_return_null_tree_v): Remove.
* cfgexpand.c (stack_protect_prologue): If guard_decl is NULL,
set y to const0_rtx.
* function.c (stack_protect_epilogue): Likewise.
* config/tilepro/tilepro.c (TARGET_STACK_PROTECT_GUARD): Redefine
if TARGET_THREAD_SSP_OFFSET is defined.
* config/s390/s390.c (TARGET_STACK_PROTECT_GUARD): Likewise.
* config/sparc/sparc.c (TARGET_STACK_PROTECT_GUARD): Likewise.
* config/tilegx/tilegx.c (TARGET_STACK_PROTECT_GUARD): Likewise.
* config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Likewise.
* config/i386/i386.c (TARGET_STACK_PROTECT_GUARD): Likewise.
(ix86_stack_protect_guard): New function.
c/
* c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
instead of lhd_return_null_tree_v.
ada/
* gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
instead of lhd_return_null_tree_v.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/misc.c
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-objc-common.h
trunk/gcc/cfgexpand.c
trunk/gcc/config/i386/i386.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sparc/sparc.c
trunk/gcc/config/tilegx/tilegx.c
trunk/gcc/config/tilepro/tilepro.c
trunk/gcc/function.c
trunk/gcc/hooks.c
trunk/gcc/hooks.h
trunk/gcc/langhooks-def.h
trunk/gcc/langhooks.c

[Bug target/77957] [6/7 Regression] Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64le

2016-10-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77957

--- Comment #1 from Jakub Jelinek  ---
Created attachment 39798
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39798=edit
gcc7-pr77957.patch

One of the problems is that for TARGET_THREAD_SSP_OFFSET targets we completely
wastefully create a MEM we don't really need and then ignore it.  This untested
patch attempts to avoid that.

The more important bug is somewhere in the rs6000 backend, that the useless
MEMs at -O0 confuse the backend enough that it contains (useless) .LCTOC0
reference/load without corresponding definition of .LCTOC0.  I'll leave this
part to the rs6000 maintainers.

[Bug target/77957] [6/7 Regression] Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64le

2016-10-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77957

Jakub Jelinek  changed:

   What|Removed |Added

 Target||powerpc64le-linux
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-10-12
 CC||dje at gcc dot gnu.org,
   ||segher at gcc dot gnu.org
   Target Milestone|--- |6.3
 Ever confirmed|0   |1