<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 - Can't override default max nesting depth for integrated assembly with clang frontend"
   href="https://bugs.llvm.org/show_bug.cgi?id=44017">44017</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't override default max nesting depth for integrated assembly with clang frontend
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>renat@idrisov.info
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22818" name="attach_22818" title="Sample program">attachment 22818</a> <a href="attachment.cgi?id=22818&action=edit" title="Sample program">[details]</a></span>
Sample program

Hi All,
I can't find a way to override `-asm-macro-max-nesting-depth` with clang.

$ cat <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to add product version numbers"
   href="show_bug.cgi?id=1">bug1</a>.s
.macro  FOO     start, end
        .if     \start <= \end
        nop
        FOO     %(\start+1), \end
        .endif
        .endm

LEAF(__test)
        FOO 1 50

$ clang -x assembler-with-cpp -integrated-as -o <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to add product version numbers"
   href="show_bug.cgi?id=1">bug1</a>.obj <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to add product version numbers"
   href="show_bug.cgi?id=1">bug1</a>.s
...
<instantiation>:3:13: error: macros cannot be nested more than 20 levels deep.
Use -asm-macro-max-nesting-depth to increase this limit.
...

$ clang -x assembler-with-cpp -integrated-as -Xassembler
-asm-macro-max-nesting-depth=100 -o <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to add product version numbers"
   href="show_bug.cgi?id=1">bug1</a>.obj <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Need to add product version numbers"
   href="show_bug.cgi?id=1">bug1</a>.s 
clang: error: unsupported argument '-asm-macro-max-nesting-depth=100' to option
'Xassembler'

$ clang --version
clang version 9.0.1-+2019110812332108004e858e4ac00-1~exp1~20191108215024.72 
Target: x86_64-pc-linux-gnu


Thanks!</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>