<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Clang fails to pass validation when compiled with gcc-9 in release build."
href="https://bugs.llvm.org/show_bug.cgi?id=40547">40547</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang fails to pass validation when compiled with gcc-9 in release build.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>serge.guelton@telecom-bretagne.eu
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Building clang 8.0.0rc1 for fedora using gcc 9 compiles file, but validation
fails in ~150 places.
When building with -O0, everything validates fine.
When building with -O1, everything validates fine.
When building with -O2, validation fails.
When building with -O2 -fsanitize=address, everything validates fine.
Running clang under valgrind gives good hint on the error location:
valgrind /builddir/build/BUILD/cfe-8.0.0rc1.src/_build/bin/clang -cc1
-internal-isystem
/builddir/build/BUILD/cfe-8.0.0rc1.src/_build/lib64/clang/8.0.0/include
-nostdsysteminc -fopenmp -x c++ -triple powerpc64le-unknown-unknown
-fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm
/builddir/build/BUILD/cfe-8.0.0rc1.src/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
-o -
==2582== Conditional jump or move depends on uninitialised value(s)
==2582== at 0x880DC79:
clang::CodeGen::CodeGenModule::ConstructAttributeList(llvm::StringRef,
clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::CGCalleeInfo,
llvm::AttributeList&, unsigned int&, bool) (CGCall.cpp:2060)
==2582== by 0x8A1E749:
clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(clang::GlobalDecl,
clang::CodeGen::CGFunctionInfo const&, llvm::Function*)
(CodeGenModule.cpp:1171)
==2582== by 0x8A238AA:
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool, bool) (CodeGenModule.cpp:1548)
==2582== by 0x8A5CA16:
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, bool, llvm::AttributeList,
clang::CodeGen::ForDefinition_t) (CodeGenModule.cpp:2824)
==2582== by 0x87F7FAC:
clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(clang::CXXMethodDecl
const*, clang::CodeGen::StructorType, clang::CodeGen::CGFunctionInfo const*,
llvm::FunctionType*, bool, clang::CodeGen::ForDefinition_t) (CGCXX.cpp:253)
==2582== by 0x882255E:
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, bool, clang::CodeGen::Address,
clang::CodeGen::CallArgList&, clang::CodeGen::AggValueSlot::Overlap_t,
clang::SourceLocation, bool) (CGClass.cpp:2134)
==2582== by 0x882343C:
clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(clang::CXXConstructorDecl
const*, clang::CXXCtorType, bool, bool, clang::CodeGen::Address,
clang::CXXConstructExpr const*, clang::CodeGen::AggValueSlot::Overlap_t, bool)
(CGClass.cpp:2052)
==2582== by 0x88B1B79: clang::CodeGen::CodeGenFunction::EmitCXXConstructEx
(...)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>