printf("bar\n");
}
-
+static void bar ( void );
int main ( void )
{
int* pi1 = (int*)junk1;
int* pi2 = (int*)junk2;
-
+ bar();
// both words completely undefined. This should give an error.
foo(pi1,pi2, &hack);
return 0;
}
+
+// Note: on ppc32/64 the second call to foo() does give an error,
+// since the expensive EQ/NE scheme does not apply to the CmpORD
+// primops used by ppc.
+static void bar ( void )
+{
+#if defined(__powerpc__) || defined(__powerpc64__)
+ fprintf(stderr, "Currently running on ppc32/64: this test should give 3 errors, not 2.\n");
+#endif
+}
--- /dev/null
+
+Currently running on ppc32/64: this test should give 3 errors, not 2.
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: foo (partiallydefinedeq.c:15)
+ by 0x........: main (partiallydefinedeq.c:37)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: foo (partiallydefinedeq.c:15)
+ by 0x........: main (partiallydefinedeq.c:45)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x........: foo (partiallydefinedeq.c:15)
+ by 0x........: main (partiallydefinedeq.c:52)
+
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
+malloc/free: in use at exit: 8 bytes in 2 blocks.
+malloc/free: 2 allocs, 0 frees, 8 bytes allocated.
+For a detailed leak analysis, rerun with: --leak-check=yes
+For counts of detected errors, rerun with: -v