<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-10: error: unable to execute command: Floating point exception (core dumped)"
   href="https://bugs.llvm.org/show_bug.cgi?id=47069">47069</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-10: error: unable to execute command: Floating point exception (core dumped)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>anbu1024.me@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat test.c 

extern char x[]; 
extern char y[];
extern char z[];

void foo ()
{
    __atomic_exchange ( & x , & y , & z , & z ) ;
}

-------------------------------------------------------------------------------

$ clang --version
clang version 10.0.1 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tom/Documents/llvm/10.0.1/install-all/bin

-------------------------------------------------------------------------------

$ clang test.c 
test.c:8:43: warning: incompatible pointer to integer conversion passing 'char
(*)[]' to parameter of type 'int' [-Wint-conversion]
    __atomic_exchange ( & x , & y , & z , & z ) ;
                                          ^~~
Stack dump:
0.      Program arguments:
/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name test.c
-mrelocation-model static -mthread-model posix -mframe-pointer=all -fmath-errno
-fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining
-debugger-tuning=gdb -resource-dir
/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1 -internal-isystem
/usr/local/include -internal-isystem
/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir
/home/tom/Documents/git/ESmith/FoundBugs2020-11/0-round-2020.08.04_06-45-30
-ferror-limit 19 -fmessage-length 0 -fgnuc-version=4.2.1 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o /tmp/test-32057a.o
-x c test.c 
1.      <eof> parser at end of file
2.      test.c:6:6: LLVM IR generation of declaration 'foo'
3.      test.c:6:6: Generating code for declaration 'foo'
 #0 0x0000000001883b1a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1883b1a)
 #1 0x000000000188181c llvm::sys::RunSignalHandlers()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x188181c)
 #2 0x0000000001881983 SignalHandler(int)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1881983)
 #3 0x00007f88cc18b390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
 #4 0x0000000001bdc6c9
clang::CodeGen::CodeGenFunction::EmitAtomicExpr(clang::AtomicExpr*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1bdc6c9)
 #5 0x0000000001d3315a (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1d3315a)
 #6 0x0000000001d33a50
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1d33a50)
 #7 0x0000000001cea2f7 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr
const*, clang::CodeGen::AggValueSlot, bool)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1cea2f7)
 #8 0x0000000001cfd4e5
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1cfd4e5)
 #9 0x0000000001ad069d clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1ad069d)
#10 0x0000000001ad0dc4
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1ad0dc4)
#11 0x0000000001b0cad8
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b0cad8)
#12 0x0000000001b18719
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b18719)
#13 0x0000000001b4a4c4
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b4a4c4)
#14 0x0000000001b48324
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b48324)
#15 0x0000000001b489d8
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b489d8)
#16 0x0000000001b4daa7
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(.part.4483.constprop.4490)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1b4daa7)
#17 0x00000000024f2ba3 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x24f2ba3)
#18 0x00000000024e78c6
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x24e78c6)
#19 0x0000000002daf958 clang::ParseAST(clang::Sema&, bool, bool)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x2daf958)
#20 0x0000000001fa0bc1 clang::FrontendAction::Execute()
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1fa0bc1)
#21 0x0000000001f60960
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x1f60960)
#22 0x000000000204a9fb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x204a9fb)
#23 0x00000000009ccd83 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ccd83)
#24 0x00000000009ca697 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ca697)
#25 0x000000000095f85b main
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x95f85b)
#26 0x00007f88cae85840 __libc_start_main
/build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:325:0
#27 0x00000000009ca0f9 _start
(/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10+0x9ca0f9)
clang-10: error: unable to execute command: Floating point exception (core
dumped)
clang-10: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 10.0.1 
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/tom/Documents/llvm/10.0.1/install-all/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-10: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/test-197b8f.c
clang-10: note: diagnostic msg: /tmp/test-197b8f.sh
clang-10: note: diagnostic msg: 

********************


$ cat /tmp/test-197b8f.c
# 1 "<built-in>"
# 1 "test.c"

extern char x[]; 
extern char y[];
extern char z[];

void foo ()
{
    __atomic_exchange ( & x , & y , & z , & z ) ;
}

-------------------------------------------------------------------------------

$ cat /tmp/test-197b8f.sh
# Crash reproducer for clang version 10.0.1 
# Driver args: "test.c"
# Original command:  "/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10"
"-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all"
"-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "test.c" "-mrelocation-model" "static" "-mthread-model"
"posix" "-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu"
"x86-64" "-dwarf-column-info" "-fno-split-dwarf-inlining"
"-debugger-tuning=gdb" "-resource-dir"
"/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/home/tom/Documents/llvm/10.0.1/install-all/lib/clang/10.0.1/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-fdebug-compilation-dir"
"/home/tom/Documents/git/ESmith/FoundBugs2020-11/0-round-2020.08.04_06-45-30"
"-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1"
"-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics"
"-faddrsig" "-o" "/tmp/test-32057a.o" "-x" "c" "test.c"
 "/home/tom/Documents/llvm/10.0.1/install-all/bin/clang-10" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "test.c"
"-mrelocation-model" "static" "-mthread-model" "posix" "-mframe-pointer=all"
"-fmath-errno" "-fno-rounding-math" "-masm-verbose" "-mconstructor-aliases"
"-munwind-tables" "-target-cpu" "x86-64" "-dwarf-column-info"
"-fno-split-dwarf-inlining" "-debugger-tuning=gdb" "-ferror-limit" "19"
"-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc"
"-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c"
"test-197b8f.c"</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>