[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


            Bug ID: 44290
           Summary: Pointers defined by clang have default pointing
           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

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.

int main(void)
    int *NISLParameter0;
    printf("%d\n", *NISLParameter0);
    return 0;

./clang/version_latest/llvm-project/build/bin/clang testcase.c

clang9.0.0 && clang10.0.0


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