<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/96904>96904</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [FileCheck] Match is not found in a line
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          futog
      </td>
    </tr>
</table>

<pre>
    Given the following match-file:
check.txt:
`// CHECK1: else`
`// CHECK2: something`

the match `CHECK2` is not found in the following case:
`echo "something else" | FileCheck check.txt -check-prefixes=CHECK1,CHECK2`

The output:
check.txt:2:12: error: CHECK2: expected string not found in input
// CHECK2: something
 ^
<stdin>:1:15: note: scanning from here
something else
 ^

Input file: <stdin>
Check file: check.txt

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

Input was:
<<<<<<
         1: something else 
check:2 X error: no match found
>>>>>>

If I switch the two lines in check.txt, it is working

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VM2OozgQfhpzKREZG8hy4NBLkt3Wam9zmCs_BXja2Mg2nZ63H9kkIc30RAQQrvL3V1BbKwaFWJLsb5KdonpxozZlvzg9RI3ufpb_iHdU4EaEXkupr0INMNWuHeNeSCT8hdAToS_tiO3bwX24xxOSU8IuhF2g-vdc_ZcQ_gIoLfrnXxUwX2D1hG4UatiqwtnjB1QgOb2V5xSEBaUd9HpRHYg9zba2-EwH21EDYewBsvJhDMixgouQWHkV8NACcbiNZ4O9-EBL-OmmhVUPEs80v40IenHz4r40xktMgk40Rht_s0nHjxlbhx1YZzy3T8KE8nuuSH_2LKwDyc63Sl5Z1wlF-NkD-3_mG5R2GBrbWikP1Rs9wYgG176dP_tdw_nVE4LbCMAzUlhejbwvbx487RB3yzTHqzB-GlHO3gJZC2V3OYYa8OWH3ylca7tlzKv9sZK__5JPfgV58BSTjwi-b-EofRu6kMMd47w_njn18Ar2KnyTF-GuGqRQaH2Imw2sAuH89F61eXskF3Ul7wpe1BGWyTEp0iLlaRqNZcaShCMvWJ2xrqBNnmasLlh-LJq0Q-wiUTLKUpqzY8KTgqaHrO8b-hfnHU8amrGUpBSnWsiDlO_TQZshEtYuWBZ5QdNI1g1Ke_8GmNIXxc0yWJJSKayzW5sTToavxeN1IdkJ_g8u7d_GOkiPFiPL0bk55BSGdxBuXJpDqyfCLn7r2yWejf6BrSPsEuhZwi4rw_eS_QoAAP__vddlgw">