mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 01:51:29 +00:00
According to Julian initialising the previously uninitialised variable
won't affect the test adversely -- so let's do this and get rid of the special compilation again. Also guard against future compiler smartness tricking the compiler into believing the variable is actually used. So the loop won't get optimised away. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14094
This commit is contained in:
parent
d7cccf3f9f
commit
5061fe24ec
@ -443,8 +443,6 @@ origin6_fp_CFLAGS = $(AM_CFLAGS) -O
|
||||
# because then we can't intercept it
|
||||
overlap_CFLAGS = $(AM_CFLAGS) -fno-builtin-memcpy -fno-builtin-strcpy
|
||||
|
||||
pdb_realloc_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
|
||||
|
||||
str_tester_CFLAGS = $(AM_CFLAGS) -Wno-shadow
|
||||
|
||||
supp_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i, t;
|
||||
int i, t = 0;
|
||||
char* x = malloc(1000);
|
||||
|
||||
// Write some PDBs (partially defined bytes)
|
||||
@ -26,6 +26,8 @@ int main(void)
|
||||
for (i = 0; i < 1000; i++)
|
||||
t += x[i];
|
||||
|
||||
__asm__ __volatile__ ("" :: "r"(t));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user