<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJytU9Fu6yAM_Rrygm5FTGjSBx7WW-03Igg0ZWUwAenUvx8hXVv1TrqaNslywMc-PiYgvTpztCYXIztEnk7eKLz3HkE3LxFsMGq3qN0t8OL7XqQUjJyS7vucmc1546xxOhfMNYVGivBdmr3NIe0WlvvcQjg-0BUEX-TOBfQaW3rfxx6aP8y9-L9WuBHXFMGlSOl9Hgqr6HvrB2GXwVBDxoUdI6DkXkvOuSVdhc1p9ZcpN50XNOhUwC9FX88rFkaM6G5ujoV9F-e4_AH8OOj9ZPAbY31P87--UpyqDd2ISkzp4ANX4mSU9PYkXDyeqylYfkjpLSL6hOA522jSYZKrwb_mjbWnz8-ft-Bf9JDy1sQ46ZgXjNI1qQ68Wbeqa1hHagJ7VbOONQ2QZtNoxggIUlkhtY0csS0CcPodF4q8RmxX_VyB4UAASA1Qd3Xb0FW3BtpKlSWxehCyzSepX4Wxq5ln5cNYBV4o5TTGDFoTU7yBIkYzOq2L4KwwmWQ13wZ_1A7_7ynhfDkGjT_vd1W08iL0AyFEIug>53360</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Broken __attribute__((flatten)) since Clang 13
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```
void foo(void) {}

__attribute__((noinline)) void bar(void) {}

__attribute__((flatten))

void g(void) {
  foo();
  bar();
}

```

Clang 13+
define dso_local void @g() #0 {
  call void @foo() #1
  call void @bar()
  ret void
}

attributes #1 = { alwaysinline }


Clang 12
define dso_local void @g() #0 {
  call void @bar()
  ret void
}





</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytUtuOgyAQ_Rp8IdsgaNUHHto1-xsGhFq2FBrANv37Rewt3SabJptMxmEuZ84BuRVnCpboYqgFaHW0SsCNtQDXUwhwA0G1BlU7l2ffdSwEp_gYZNfFzmjGKqOVkXFgmkkwnLl3YTY6pqSZUR57E-DwBJcq8EJ3GiC33Lz7Mfe0_En37D81MwPMCcCXISE3URQU3nba9kzPwkCBhhkdAkzQI5fYc2-6EZva8pctd56XqpMhFV-Svt2XT4gQkHZaDpk-sbOfXwA-C31Uhv9D1nucf_tMUCIa0rAsqKAlXTu7kwb-9TvAKLCX8PpG2eg03YZw8ICsAP6KNqiwHfmit_t40Pp4_XwcnP2WfYhH5f0ofQxKQpYo29K6qpdl3tcbUeS4bOqy4YIgXBZ51TeCo0wzLrWnoFwDjI08wQQRY1C2maIYYYxyjPM6rwqyqJeYVFwUZR1BGa_idck9U3ox8VhYN2SOJkp8HHwsauWDvxeZ92owUqZ1EZ-NYWsdFeyoBLf6yIzfnbPEgCYFP1jZDh4">