repo.or.cz
/
clang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git]
/
test
/
CodeGen
/
2008-07-31-promotion-of-compound-pointer-arithmetic.c
blob
de062631f93bb827d8e1bbaaeb2b974f8f074656
1
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3
2
// <rdr://6115726>
3
4
int
f0
() {
5
int
x
;
6
unsigned short
n
=
1
;
7
int
*
a
= &
x
;
8
int
*
b
= &
x
;
9
a
=
a
-
n
;
10
b
-=
n
;
11
return
a
==
b
;
12
}
13
14
int
f1
(
int
*
a
) {
15
long
b
=
a
- (
int
*)
1
;
16
a
-= (
int
*)
1
;
17
return
b
== (
long
)
a
;
18
}
19
20
int
f2
(
long
n
) {
21
int
*
b
=
n
+ (
int
*)
1
;
22
n
+= (
int
*)
1
;
23
return
b
== (
int
*)
n
;
24
}
25