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

            Bug ID: 23151
           Summary: Clang VLA internal failure.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

This code gives internal failure error no both C & C++ Clang compiler:

#include <stddef.h>
#include <stdio.h>


void func(size_t sz, int (*arr)[*])
{
    printf("%lu", sizeof(*arr) / sizeof(int));
}

int main()
{
    size_t sz = 3;

    int arr[sz];

    func(sz, &arr);
}

Life example:

http://melpon.org/wandbox/permlink/ygeV7ELkk49jRZFS

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to