[llvm-bugs] [Bug 44290] New: Pointers defined by clang have default pointing values.
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Thu Dec 12 18:55:17 PST 2019
    
    
  
https://bugs.llvm.org/show_bug.cgi?id=44290
            Bug ID: 44290
           Summary: Pointers defined by clang have default pointing
                    values.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: 1059252359 at qq.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk
Hi,
when I used clang9.0 and the latest version to output the value that
NISLParameter0 points to, they both outputed 1. While other compilers, such as
gcc and intelc,reported Segmentation fault.
TestCase:
#include<stdio.h>
int main(void)
{
    int *NISLParameter0;
    printf("%d\n", *NISLParameter0);
    return 0;
}
Command:
./clang/version_latest/llvm-project/build/bin/clang testcase.c
./a.out
Version:
clang9.0.0 && clang10.0.0
Output:
1
Expected output:
Segmentation fault
Is this right for the clang complier? Looking forward to your reply.
-- 
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/20191213/752766d1/attachment.html>
    
    
More information about the llvm-bugs
mailing list