mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 05:00:39 +00:00
Fix some llvm-gcc warnings in testcases, mostly by adding includes or adding
declarations. These are the fixes that I was pretty confident about, there are still a lot of other llvm-gcc warnings of which I'm not sure if they can be safely ignored or fixed, without breaking the test case. This fixes 11 testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1cd8f11cc0
commit
b7e103ba41
@ -21,7 +21,7 @@ int test2(short F) {
|
||||
}
|
||||
|
||||
// Make sure that normal unions work. duh :)
|
||||
volatile union {
|
||||
volatile union U_t {
|
||||
short S;
|
||||
int i;
|
||||
} U;
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
/* GCC wasn't handling 64 bit constants right fixed */
|
||||
|
||||
void main() {
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
long long Var = 123455678902ll;
|
||||
printf("%lld\n", Var);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
/* GCC is not outputting the static array to the LLVM backend, so bad things
|
||||
* happen. Note that if this is defined static, everything seems fine.
|
||||
*/
|
||||
void test(unsigned X) {
|
||||
double test(unsigned X) {
|
||||
double student_t[30]={0.0 , 12.706 , 4.303 , 3.182 , 2.776 , 2.571 ,
|
||||
2.447 , 2.365 , 2.306 , 2.262 , 2.228 ,
|
||||
2.201 , 2.179 , 2.160 , 2.145 , 2.131 ,
|
||||
|
@ -13,7 +13,7 @@ union X foo() {
|
||||
return Global;
|
||||
}
|
||||
|
||||
void main() {
|
||||
int main() {
|
||||
union X test = foo();
|
||||
printf("0x%p", test.B);
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
union U{
|
||||
int i[8];
|
||||
char s[80];
|
||||
|
@ -1,5 +1,7 @@
|
||||
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3
|
||||
|
||||
#include <memory.h>
|
||||
|
||||
void test(int* X, char *Y) {
|
||||
memset(X, 4, 1000);
|
||||
bzero(Y, 100);
|
||||
|
@ -1,5 +1,7 @@
|
||||
// RUN: %llvmgcc -O3 -xc %s -c -o - | llvm-dis | not grep builtin
|
||||
|
||||
#include <math.h>
|
||||
|
||||
void zsqrtxxx(float num) {
|
||||
num = sqrt(num);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %llvmgcc %s -S -o - -fno-math-errno | gccas | llvm-dis | grep llvm.sqrt
|
||||
// RUN: %llvmgcc %s -S -o - -fno-math-errno | grep llvm.sqrt
|
||||
#include <math.h>
|
||||
|
||||
float foo(float X) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
int sub1(int i, char *pi) {
|
||||
typedef int foo[i];
|
||||
struct bar {foo f1; int f2:3; int f3:4} *p = (struct bar *) pi;
|
||||
struct bar {foo f1; int f2:3; int f3:4;} *p = (struct bar *) pi;
|
||||
xxx(p->f1);
|
||||
return p->f3;
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
// RUN: %llvmgcc -S %s -o -
|
||||
// PR1708
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
struct s { _Complex unsigned short x; };
|
||||
struct s gs = { 100 + 200i };
|
||||
struct s __attribute__((noinline)) foo (void) { return gs; }
|
||||
|
@ -4,6 +4,8 @@
|
||||
// RUN: %llvmgcc %s -S -emit-llvm -O1 -o - | grep {call.*ldexp}
|
||||
// RUN: %llvmgcc %s -S -emit-llvm -O3 -fno-builtin -o - | grep {call.*exp2f}
|
||||
|
||||
float exp2f(float);
|
||||
|
||||
float t4(unsigned char x) {
|
||||
return exp2f(x);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user