diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-03-04 04:02:35 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-03-04 04:02:35 +0000 |
commit | 25615424741bcce31fe52c896f76268f0307f00d (patch) | |
tree | 158f229570dcc760690eec8b11e055e0d4e565b5 /test/CodeGen/PR3709-int-to-pointer-sign.c | |
parent | dab514fc30242c7afd6c03956e46136c400fb0d3 (diff) |
Attempt to fix PR3709: when converting from an integer to a pointer,
first extend the integer to the correct width.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PR3709-int-to-pointer-sign.c')
-rw-r--r-- | test/CodeGen/PR3709-int-to-pointer-sign.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/CodeGen/PR3709-int-to-pointer-sign.c b/test/CodeGen/PR3709-int-to-pointer-sign.c new file mode 100644 index 0000000000..85944a3794 --- /dev/null +++ b/test/CodeGen/PR3709-int-to-pointer-sign.c @@ -0,0 +1,5 @@ +// RUN: clang -emit-llvm %s -o - -O1 -triple=x86_64-gnu-linux | grep "i64 -1" + +// PR3709 +long long a() { return (long long)(int*)-1;} + |