[llvm-bugs] [Bug 33162] Many arguments to function causes false use of undeclared identifier

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 25 10:38:02 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33162

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rnk at google.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
Yes, this an undiagnosed implementation limit. If you compile your program with
assertions enabled, it will crash the compiler:
$ clang -c ~/Downloads/param_32k.c
Assertion failed: NumParams == params.size() && "function has too many
parameters", file C:\src\llvm-project\clang\lib\AST\Type.cpp, line 2662

I filed http://llvm.org/pr19607 when I discovered this:

> Relatedly, we cap out at 2**15 function parameters:
> 
> $ cat t.py
> print 'void foo(',
> for i in range(0, 2**15):
>   print 'int a%d,' % i,
> print 'int a%d);' % (i + 1)
> 
> $ python t.py | clang -c -x c -
> Assertion failed: NumParams == params.size() && "function has too many parameters", file ..\tools\clang\lib\AST\Type.cpp, line 1604

*** This bug has been marked as a duplicate of bug 19607 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170525/87c575ae/attachment-0001.html>


More information about the llvm-bugs mailing list