mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
99fca5de96
Fixes PR8389. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116812 91177308-0d34-0410-b5e6-96231b3b80d8
17 lines
370 B
LLVM
17 lines
370 B
LLVM
; RUN: opt < %s -globalopt -S | FileCheck %s
|
|
|
|
; PR8389: Globals with weak_odr linkage type must not be modified
|
|
|
|
; CHECK: weak_odr global i32 0
|
|
|
|
@SomeVar = weak_odr global i32 0
|
|
|
|
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @CTOR } ]
|
|
|
|
define internal void @CTOR() {
|
|
store i32 23, i32* @SomeVar
|
|
ret void
|
|
}
|
|
|
|
|