From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13857 invoked by alias); 17 May 2015 07:07:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13823 invoked by uid 48); 17 May 2015 07:07:41 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/66180] New: [6 Regression] many -Wodr false positives when building LLVM with -flto Date: Sun, 17 May 2015 07:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01296.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66180 Bug ID: 66180 Summary: [6 Regression] many -Wodr false positives when building LLVM with -flto Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org CC: hubicka at gcc dot gnu.org Target Milestone: --- for example: trippels@gcc2-power8 llvm_build % cmake -DCMAKE_INSTALL_PREFIX=3D~/llvm-ins= tall -DCMAKE_BUILD_TYPE=3Drelease -DLLVM_ENABLE_ASSERTIONS=3Don -DLLVM_TARGETS_TO_BUILD=3D"PowerPC" -DCMAKE_CXX_FLAGS_RELEASE:STRING=3D"-O3 -DNDEBUG -pipe -flto=3D60" -DCMAKE_EXE_LINKER_FLAGS=3D"-Wl,-O1,--hash-style=3Dgnu,--gc-sections,--icf= =3Dsafe" -DENABLE_PIC=3D1 -DCMAKE_EXPORT_COMPILE_COMMANDS=3DON -DLLVM_BINUTILS_INCDIR=3D/home/trippels/include -DCMAKE_C_COMPILER=3D/home/trippels/gcc_6/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=3D/home/trippels/gcc_6/usr/local/bin/g++ ~/llvm trippels@gcc2-power8 llvm_build % make -j120 ... /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: warning: type =E2=80=98struct __aligned_buffer=E2=80=99 violates one defini= tion rule [-Wodr] struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: note: a type with the same name but different base type is defined in anoth= er translation unit struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/type_traits:1985:12: note: type name =E2=80=98std::aligned_storage<104ul, 8ul>=E2=80=99 should match t= ype name =E2=80=98std::aligned_storage<96ul, 8ul>=E2=80=99=20=20 struct aligned_storage ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/type_traits:1985:12: note:= the incompatible type is defined here struct aligned_storage ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_tree.h:134:12: warning: type =E2=80=98struct _Rb_tree_node=E2=80=99 violates one definitio= n rule [-Wodr] struct _Rb_tree_node : public _Rb_tree_node_base ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_tree.h:134:12: no= te: a different type is defined in another translation unit struct _Rb_tree_node : public _Rb_tree_node_base ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_tree.h:149:41: no= te: the first difference of corresponding definitions is field =E2=80=98_M_stor= age=E2=80=99 __gnu_cxx::__aligned_buffer<_Val> _M_storage; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_tree.h:149:41: no= te: a field of same name but different type is defined in another translation u= nit __gnu_cxx::__aligned_buffer<_Val> _M_storage; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: note: type =E2=80=98struct __aligned_buffer=E2=80=99 should match type =E2= =80=98struct __aligned_buffer=E2=80=99 that itself violate one definition rule struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: note: the incompatible type is defined here struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:96:12: warning: type =E2=80=98struct pair=E2=80=99 violates one definition rule [-= Wodr] struct pair ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:96:12: not= e: a different type is defined in another translation unit struct pair ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:102:11: no= te: the first difference of corresponding definitions is field =E2=80=98second= =E2=80=99 _T2 second; /// @c second is a copy of the second obj= ect ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:102:11: no= te: a field of same name but different type is defined in another translation u= nit _T2 second; /// @c second is a copy of the second obj= ect ^ /home/trippels/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp:= 131:10: note: type =E2=80=98struct GroupInfo=E2=80=99 defined in anonymous namespac= e can not match type =E2=80=98struct GroupInfo=E2=80=99 struct GroupInfo { ^ /home/trippels/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp:7= 3:8: note: the incompatible type defined in anonymous namespace in another translation unit struct GroupInfo { ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:99:19: warning: type =E2=80=98struct second_type=E2=80=99 violates one definition = rule [-Wodr] typedef _T2 second_type; /// @c second_type is the second bound ty= pe ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/stl_pair.h:99:19: not= e: a different type is defined in another translation unit typedef _T2 second_type; /// @c second_type is the second bound ty= pe ^ /home/trippels/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp:= 132:32: note: the first difference of corresponding definitions is field =E2=80=98D= iagsInGroup=E2=80=99 std::vector DiagsInGroup; ^ /home/trippels/llvm/tools/clang/utils/TableGen/ClangSACheckersEmitter.cpp:7= 4:33: note: a field with different name is defined in another translation unit llvm::DenseSet Checkers; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: warning: type =E2=80=98struct __aligned_buffer=E2=80=99 violates one defini= tion rule [-Wodr] struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/ext/aligned_buffer.h:43:12: note: a type with the same name but different base type is defined in anoth= er translation unit struct __aligned_buffer ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/type_traits:1985:12: note: type name =E2=80=98std::aligned_storage<96ul, 8ul>=E2=80=99 should match ty= pe name =E2=80=98std::aligned_storage<104ul, 8ul>=E2=80=99=20=20 struct aligned_storage ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/type_traits:1985:12: note:= the incompatible type is defined here struct aligned_storage ^ ... /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:102:12: warning: type =E2=80=98struct _Head_base=E2=80=99 violates one definition rule [-Wodr] struct _Head_base<_Idx, _Head, false> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:102:12: note: a different type is defined in another translation unit struct _Head_base<_Idx, _Head, false> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:147:13: note: the fi= rst difference of corresponding definitions is field =E2=80=98_M_head_impl=E2= =80=99 _Head _M_head_impl; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:147:13: note: a fiel= d of same name but different type is defined in another translation unit _Head _M_head_impl; ^ /home/trippels/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp:28:7: note: type =E2=80=98struct FunctionArgEnumerator=E2=80=99 defined in anonymous namespa= ce can not match type =E2=80=98struct FunctionArgEnumerator=E2=80=99 class FunctionArgEnumerator : public IPDBEnumChildren { ^ /home/trippels/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp:24:7: no= te: the incompatible type defined in anonymous namespace in another translation unit class FunctionArgEnumerator : public IPDBEnumSymbols { ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:180:12: warning: type =E2=80=98struct _Tuple_impl=E2=80=99 violates one definition rule [-Wodr] struct _Tuple_impl<_Idx, _Head, _Tail...> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:180:12: note: a type with different bases is defined in another translation unit struct _Tuple_impl<_Idx, _Head, _Tail...> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:596:11: warning: type =E2=80=98struct tuple=E2=80=99 violates one definition rule [-Wodr] class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/tuple:596:11: note: a type with different bases is defined in another translation unit class tuple<_T1, _T2> : public _Tuple_impl<0, _T1, _T2> ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:129:11: warning: type =E2=80=98struct unique_ptr=E2=80=99 violates one definition r= ule [-Wodr] class unique_ptr ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:129:11: note: a different type is defined in another translation unit class unique_ptr ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:147:57: note: the first difference of corresponding definitions is field =E2=80=98_= M_t=E2=80=99 __tuple_type _M_t; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:147:57: note: a field of same name but different type is defined in another transla= tion unit __tuple_type _M_t; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:146:57: note: type =E2=80=98struct __tuple_type=E2=80=99 should match type =E2=80= =98struct __tuple_type=E2=80=99 that itself violate one definition rule typedef std::tuple __tuple_type; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:146:57: note: the incompatible type is defined here typedef std::tuple __tuple_type; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:151:41: warning: type =E2=80=98struct element_type=E2=80=99 violates one definition= rule [-Wodr] typedef _Tp element_type; ^ /home/trippels/gcc_6/usr/local/include/c++/6.0.0/bits/unique_ptr.h:151:41: note: a type with the same name but different base type is defined in anoth= er translation unit typedef _Tp element_type; ^ /home/trippels/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h:18:37: no= te: type name =E2=80=98llvm::IPDBEnumChildren=E2=80=99 should = match type name =E2=80=98llvm::IPDBEnumChildren=E2=80=99 template class IPDBEnumChildren { ^ /home/trippels/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h:18:37: no= te: the incompatible type is defined here template class IPDBEnumChildren { ^ etc. >>From gcc-bugs-return-486457-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun May 17 07:12:49 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 16430 invoked by alias); 17 May 2015 07:12:48 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 16294 invoked by uid 48); 17 May 2015 07:12:43 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/66180] [6 Regression] many -Wodr false positives when building LLVM with -flto Date: Sun, 17 May 2015 07:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01297.txt.bz2 Content-length: 175 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66180 --- Comment #1 from Andrew Pinski --- Some look real to me due to anonymous namespace usage.