This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR rtl-optimization/32219: optimizer causees wrong code in pic/hidden/weak symbol checking


Hello!

> 2015-02-12  H.J. Lu  <hongjiu.lu@intel.com>
>             Richard Henderson  <rth@redhat.com>
>
>         PR rtl/32219
>         * cgraphunit.c (cgraph_node::finalize_function): Set definition
>         before notice_global_symbol.
>         (varpool_node::finalize_decl): Likewise.
>         * varasm.c (default_binds_local_p_2): Rename from
>         default_binds_local_p_1, add weak_dominate argument.  Use direct
>         returns instead of assigning to local variable.  Unify varpool and
>         cgraph paths via symtab_node.  Reject undef weak variables before
>         testing visibility.  Reorder tests for simplicity.
>         (default_binds_local_p): Use default_binds_local_p_2.
>         (default_binds_local_p_1): Likewise.
>         (decl_binds_to_current_def_p): Unify varpool and cgraph paths
>         via symtab_node.
>         (default_elf_asm_output_external): Emit visibility when specified.

It looks like this patch broke alphaev68-linux-gnu [1]. There are many
failures of the type:

/tmp/cck7V7MR.o: In function
`__static_initialization_and_destruction_0(int, int)':^M
(.text+0x3ac): relocation truncated to fit: GPRELHIGH against symbol
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string()@@GLIBCXX_3.4.21' defined in
.text section in
/space/uros/gcc-build/alphaev68-unknown-linux-gnu/./libstdc++-v3/src/.libs/libstdc++.so^M
/space/homedirs/uros/local/bin/ld: /tmp/cck7V7MR.o: gp-relative
relocation against dynamic symbol
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4.21^M
/space/homedirs/uros/local/bin/ld: final link failed: Nonrepresentable
section on output^M

An example is g++.dg/torture/pr60750.C :

/space/uros/gcc-build/gcc/testsuite/g++/../../xg++
-B/space/uros/gcc-build/gcc/testsuite/g++/../../
/space/homedirs/uros/gcc-svn/trunk/gcc/testsuite/g++.dg/torture/pr60750.C
-fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++
-I/space/homedirs/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/alphaev68-unknown-linux-gnu
-I/space/homedirs/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include
-I/space/homedirs/uros/gcc-svn/trunk/libstdc++-v3/libsupc++
-I/space/homedirs/uros/gcc-svn/trunk/libstdc++-v3/include/backward
-I/space/homedirs/uros/gcc-svn/trunk/libstdc++-v3/testsuite/util
-fmessage-length=0 -O0 -std=c++11
-L/space/uros/gcc-build/alphaev68-unknown-linux-gnu/./libstdc++-v3/src/.libs
-B/space/uros/gcc-build/alphaev68-unknown-linux-gnu/./libstdc++-v3/src/.libs
-L/space/uros/gcc-build/alphaev68-unknown-linux-gnu/./libstdc++-v3/src/.libs
-lm -o ./pr60750.exe^M
/space/homedirs/uros/local/bin/ld: /tmp/cck7V7MR.o: gp-relative
relocation against dynamic symbol
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4.21^M
/tmp/cck7V7MR.o: In function
`__static_initialization_and_destruction_0(int, int)':^M
(.text+0x3ac): relocation truncated to fit: GPRELHIGH against symbol
`std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string()@@GLIBCXX_3.4.21' defined in
.text section in
/space/uros/gcc-build/alphaev68-unknown-linux-gnu/./libstdc++-v3/src/.libs/libstdc++.so^M
/space/homedirs/uros/local/bin/ld: /tmp/cck7V7MR.o: gp-relative
relocation against dynamic symbol
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4.21^M
/space/homedirs/uros/local/bin/ld: final link failed: Nonrepresentable
section on output^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1

[1] https://gcc.gnu.org/ml/gcc-testresults/2015-02/msg01867.html

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]