<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 - CodeGen/flatten.c and CodeGenCXX/flatten.cpp tests fail when building clang standalone"
   href="https://bugs.llvm.org/show_bug.cgi?id=51364">51364</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CodeGen/flatten.c and CodeGenCXX/flatten.cpp tests fail when building clang standalone
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mgorny@gentoo.org
          </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>

        <tr>
          <th>Blocks</th>
          <td>51236
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I can reproduce by:

1. Installing LLVM 13.0.0rc1 to the system (static libs/dylib don't seem to
matter).

2. Build clang against it:

  cmake .. -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel
-DLLVM_MAIN_SRC_DIR=/home/mgorny/git/llvm-project/llvm
-DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF
  ninja check-clang

The tests used to pass 100% in 12.0.1.  They also pass in a combined LLVM+Clang
build.  I haven't been able to pinpoint a specific difference between these two
builds.

The test failures are:

FAIL: Clang :: CodeGenCXX/flatten.cpp (14777 of 28338)
******************** TEST 'Clang :: CodeGenCXX/flatten.cpp' FAILED
********************
Script:
--
: 'RUN: at line 5';   /home/mgorny/git/llvm-project/clang/build/bin/clang -cc1
-internal-isystem
/home/mgorny/git/llvm-project/clang/build/lib64/clang/13.0.0/include
-nostdsysteminc -triple=x86_64-linux-gnu -std=c++11
/home/mgorny/git/llvm-project/clang/test/CodeGenCXX/flatten.cpp -emit-llvm -o -
| /usr/lib/llvm/13/bin/FileCheck
/home/mgorny/git/llvm-project/clang/test/CodeGenCXX/flatten.cpp
--
Exit Code: 1

Command Output (stderr):
--
/home/mgorny/git/llvm-project/clang/test/CodeGenCXX/flatten.cpp:12:16: error:
CHECK-NOT: excluded string found in input
 // CHECK-NOT: call {{.*}} @_Z1fv
               ^
<stdin>:15:2: note: found here
 call void @_Z1fv() #1
 ^~~~~~~~~~~~~~~~

Input file: <stdin>
Check file: /home/mgorny/git/llvm-project/clang/test/CodeGenCXX/flatten.cpp

-dump-input=help explains the following input dump.

Input was:
<<<<<<
        .
        .
        .
       10: } 
       11:  
       12: ; Function Attrs: mustprogress noinline nounwind optnone 
       13: define dso_local void @_Z1gv() #0 { 
       14: entry: 
       15:  call void @_Z1fv() #1 
not:12      !~~~~~~~~~~~~~~~       error: no match expected
       16:  ret void 
       17: } 
       18:  
       19: attributes #0 = { mustprogress noinline nounwind optnone
"frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true"
"stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87"

       20: attributes #1 = { alwaysinline } 
        .
        .
        .
<span class="quote">>>>>>></span >

--

********************
FAIL: Clang :: CodeGen/flatten.c (22861 of 28338)
******************** TEST 'Clang :: CodeGen/flatten.c' FAILED
********************
Script:
--
: 'RUN: at line 7';   /home/mgorny/git/llvm-project/clang/build/bin/clang -cc1
-internal-isystem
/home/mgorny/git/llvm-project/clang/build/lib64/clang/13.0.0/include
-nostdsysteminc -triple=x86_64-linux-gnu
/home/mgorny/git/llvm-project/clang/test/CodeGen/flatten.c -emit-llvm -o - |
/usr/lib/llvm/13/bin/FileCheck
/home/mgorny/git/llvm-project/clang/test/CodeGen/flatten.c
--
Exit Code: 1

Command Output (stderr):
--
/home/mgorny/git/llvm-project/clang/test/CodeGen/flatten.c:16:16: error:
CHECK-NOT: excluded string found in input
 // CHECK-NOT: call {{.*}} @f
               ^
<stdin>:21:2: note: found here
 call void @f() #1
 ^~~~~~~~~~~~

Input file: <stdin>
Check file: /home/mgorny/git/llvm-project/clang/test/CodeGen/flatten.c

-dump-input=help explains the following input dump.

Input was:
<<<<<<
        .
        .
        .
       16: } 
       17:  
       18: ; Function Attrs: noinline nounwind optnone 
       19: define dso_local void @g() #0 { 
       20: entry: 
       21:  call void @f() #1 
not:16      !~~~~~~~~~~~       error: no match expected
       22:  call void @ni() 
       23:  ret void 
       24: } 
       25:  
       26: ; Function Attrs: noinline nounwind optnone 
        .
        .
        .
<span class="quote">>>>>>></span >

--

********************</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] 13.0.0 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=51236">Bug 51236</a>] [meta] 13.0.0 Release Blockers
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>