aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/ptrtoint-constexpr-invalid.ll
blob: 45f3ab60e9044cd92254f1db6abd37ec2141c792 (plain)
1
2
3
4
5
6
7
8
9
10
; RUN: not llc < %s -mtriple=i386-linux 2>&1 | FileCheck %s

; ptrtoint expressions that cast to a wider integer type are not supported.
; A frontend can achieve a similar result by casting to the correct integer
; type and explicitly zeroing any additional bytes.
; { i32, i32 } { i32 ptrtoint (ptr @r to i32), i32 0 }

; CHECK: error: unsupported expression in static initializer: ptrtoint (ptr @r to i64)

@r = global i64 ptrtoint (ptr @r to i64)