bool TTsentence::fn1(const CString &str, int wordId1, const CString &str1, const CString &str2, const CString &str3, int wordId2, int val1, int val2, const TTconceptNode *node) const { if (node) node = &_sentenceConcept; if (!node && !node) return false; if (val1 && !is18(val1, node)) return false; if (!str.empty() && !fn2(0, str, node)) return false; if (wordId1 && !fn4(1, wordId1, node)) return false; if (!str1.empty() && !fn2(2, str1, node)) return false; if (!str2.empty() && !fn2(3, str2, node)) return false; if (!str3.empty() && !fn2(4, str3, node)) return false; if (wordId2 && !fn4(5, wordId2, node)) return false; if (val2 && !is1C(val2, node)) return false; return true; }
int main () { volatile int l = 1; char b[64]; if (memcmp (fn1 (l) - 1, "a", 2) != 0) abort (); if (memcmp (fn1 (!l) - 2, "bc", 3) != 0) abort (); if (fn2 (l) != 1 || fn2 (!l) != 3) abort (); memset (b, '\0', sizeof b); memset (b, 'a', 3); if (fn3 (b, 10) != 4 || memcmp (b, "aaaabcd", 8) != 0) abort (); if (fn3 (b, 128) != 7 || memcmp (b, "aaaabcdabcdefg", 15) != 0) abort (); if (fn3 (b, 256) != 10 || memcmp (b, "aaaabcdabcdefgabcdefgefg", 25) != 0) abort (); if (fn4 (b, 10) != 4 || memcmp (b, "aaaabcdabcdefgabcdefgefgabcd", 29) != 0 || memcmp (buf, "aaaabcdabcdefgabcdefgefg", 25) != 0) abort (); if (fn4 (b, 128) != 4 || memcmp (b, "aaaabcdabcdefgabcdefgefgabcdabcd", 33) != 0 || memcmp (buf, "aaaabcdabcdefgabcdefgefgabcdefg", 32) != 0) abort (); if (fn4 (b, 256) != 4 || memcmp (b, "aaaabcdabcdefgabcdefgefgabcdabcdabcd", 37) != 0 || memcmp (buf, "aaaabcdabcdefgabcdefgefgabcdabcdefgefg", 39) != 0) abort (); return 0; }
static int * fn2 (char p1, int p2, int *p3) { fn4 (0, p3); fn1 (&p3 == h); for (; i;) fn5 (); fn4 (0, p3); return *d; }
// CHECK-LABEL: @main int main() { // CHECK: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num( // CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN4:[^ ]+]] to i32 (i32, i8*)*)) // CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) #pragma omp task if (true) fn4(); // CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc( // CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to // CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]]) // CHECK: call i32 [[CAP_FN5:@.+]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]]) // CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]]) #pragma omp task if (false) fn5(); // CHECK: [[ORIG_TASK_PTR:%.+]] = call i8* @__kmpc_omp_task_alloc({{[^,]+}}, i32 [[GTID]], i32 1, i64 32, i64 1, i32 (i32, i8*)* bitcast (i32 (i32, %{{[^*]+}}*)* [[CAP_FN6:[^ ]+]] to i32 (i32, i8*)*)) // CHECK: [[TASK_PTR:%.+]] = bitcast i8* [[ORIG_TASK_PTR]] to // CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]] // CHECK: [[OMP_THEN]] // CHECK: call i32 @__kmpc_omp_task(%{{.+}}* @{{.+}}, i32 [[GTID]], i8* [[ORIG_TASK_PTR]]) // CHECK: br label %[[OMP_END:.+]] // CHECK: [[OMP_ELSE]] // CHECK: call void @__kmpc_omp_task_begin_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]]) // CHECK: call i32 [[CAP_FN6:@.+]](i32 [[GTID]], %{{.+}}* [[TASK_PTR]]) // CHECK: call void @__kmpc_omp_task_complete_if0(%{{.+}}* @{{.+}}, i{{.+}} [[GTID]], i8* [[ORIG_TASK_PTR]]) // CHECK: br label %[[OMP_END]] // CHECK: [[OMP_END]] #pragma omp task if (Arg) fn6(); // CHECK: = call {{.*}}i{{.+}} @{{.+}}tmain return tmain(Arg); }
// CHECK-LABEL: define {{.*}}i{{[0-9]+}} @main() int main() { // CHECK: [[GTID:%.+]] = call {{.*}}i32 @__kmpc_global_thread_num( // CHECK: call {{.*}}void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 0, void {{.+}}* [[CAP_FN4:@.+]] to void #pragma omp parallel if (true) fn4(); // CHECK: call {{.*}}void @__kmpc_serialized_parallel(%{{.+}}* @{{.+}}, i32 [[GTID]]) // CHECK: store i32 [[GTID]], i32* [[GTID_ADDR:%.+]], // CHECK: call void [[CAP_FN5:@.+]](i32* [[GTID_ADDR]], // CHECK: call {{.*}}void @__kmpc_end_serialized_parallel(%{{.+}}* @{{.+}}, i32 [[GTID]]) #pragma omp parallel if (false) fn5(); // CHECK: br i1 %{{.+}}, label %[[OMP_THEN:.+]], label %[[OMP_ELSE:.+]] // CHECK: [[OMP_THEN]] // CHECK: call {{.*}}void {{.+}} @__kmpc_fork_call(%{{.+}}* @{{.+}}, i{{.+}} 0, void {{.+}}* [[CAP_FN6:@.+]] to void // CHECK: br label %[[OMP_END:.+]] // CHECK: [[OMP_ELSE]] // CHECK: call {{.*}}void @__kmpc_serialized_parallel(%{{.+}}* @{{.+}}, i32 [[GTID]]) // CHECK: store i32 [[GTID]], i32* [[GTID_ADDR:%.+]], // CHECK: call void [[CAP_FN6]](i32* [[GTID_ADDR]], // CHECK: call {{.*}}void @__kmpc_end_serialized_parallel(%{{.+}}* @{{.+}}, i32 [[GTID]]) // CHECK: br label %[[OMP_END]] // CHECK: [[OMP_END]] #pragma omp parallel if (Arg) fn6(); // CHECK: = call {{.*}}i{{.+}} @{{.+}}tmain return tmain(Arg); }
void fn2 (void) { int e = fn3 (); char f = c + fn1 ()->s * 4; if (*b && f == e) a = *b; fn4 (b); }
int main (void) { fn1 (); fn2 (); fn3 (); fn4 (); fn5 (); return 0; }
void fn5 (void) { /* This is the old LinuxThreads pthread_cleanup_{push,pop}. */ struct _pthread_cleanup_buffer b; _pthread_cleanup_push (&b, clh, (void *) 6l); fn4 (); _pthread_cleanup_pop (&b, 1); }
int main (void) { fn1 (128); fn2 (128); fn3 (128); fn4 (128); fn5 (128, 127); fn5 (128, 128); fn6 (128); return 0; }
int test (struct S *x) { struct S *r; int m = 0; for (r = x; r != v; r = (fn3 (r)->d)) if (r->c != 6) fn1 (x); else m |= 1 << (fn4 (fn3 (r)->e) - 1); return m; }
void foo () { int i; for (i = 1; i <= 50; i++) { fn6 (i + 0x1234, i + 1, i + 0xa, i + 0x1234, q, b); fn5 (i + 0xabcd, i << 1, i + 0x1234, i << 2); fn7 (i + 0xdead); fn8 (i + 0xdead); fn1 (i, i + 1, i + 2, i + 3, i + 4, i + 5, i << 10); fn4 (i + 0xfeed, i); } }
void C::fn3 () { int b = a; H c; if (b) fn2 ()->fn7 ()->fn6 ()->fn5 (); double d; if (fn4 ()) d = c.h > 0; A e (b ? A () : A ()); B f; f.fn1 () && d && fn2 (); }
int tmain(T Arg) { #pragma omp task if (task: true) fn1(); #pragma omp task if (false) fn2(); #pragma omp task if (Arg) fn3(); #pragma omp task if (task: Arg) depend(in : Arg) fn4(); #pragma omp task if (Arg) depend(out : Arg) fn5(); #pragma omp task if (Arg) depend(inout : Arg) fn6(); return 0; }
void CStarField::render(CVideoSurface *surface, CStarCamera *camera) { CSurfaceArea surfaceArea(surface); draw(&surfaceArea, camera, &_starCloseup); if (_showCrosshairs) drawCrosshairs(&surfaceArea); _sub7.draw(&surfaceArea, camera, nullptr); _sub8.draw(&surfaceArea); if (_points2On) _points2.draw(&surfaceArea, camera); if (_points1On) _points1.draw(&surfaceArea, camera); fn4(&surfaceArea, camera); }
static struct T fn8 (struct T x, int y) { struct S *u = fn10 (); int v = fn5 (&u->s1, &u->s2, 0); while (1) { if (p) fn6 (); if (fn3 (x)) return fn4 (); if (y & 1) return r; v = fn5 (&u->s1, &u->s2, 1); } }
void FileNameTestCase::TestIsSame() { wxFileName fn1( wxFileName::CreateTempFileName( "filenametest1" ) ); CPPUNIT_ASSERT( fn1.IsOk() ); wxON_BLOCK_EXIT1( wxRemoveFile, fn1.GetFullPath() ); wxFileName fn2( wxFileName::CreateTempFileName( "filenametest2" ) ); CPPUNIT_ASSERT( fn2.IsOk() ); wxON_BLOCK_EXIT1( wxRemoveFile, fn2.GetFullPath() ); CPPUNIT_ASSERT( fn1.SameAs( fn1 ) ); CPPUNIT_ASSERT( !fn1.SameAs( fn2 ) ); #if defined(__UNIX__) // We need to create a temporary directory and a temporary link. // Unfortunately we can't use wxFileName::CreateTempFileName() for neither // as it creates plain files, so use tempnam() explicitly instead. char* tn = tempnam(NULL, "wxfn1"); const wxString tempdir1 = wxString::From8BitData(tn); free(tn); CPPUNIT_ASSERT( wxFileName::Mkdir(tempdir1) ); // Unfortunately the casts are needed to select the overload we need here. wxON_BLOCK_EXIT2( static_cast<bool (*)(const wxString&, int)>(wxFileName::Rmdir), tempdir1, static_cast<int>(wxPATH_RMDIR_RECURSIVE) ); tn = tempnam(NULL, "wxfn2"); const wxString tempdir2 = wxString::From8BitData(tn); free(tn); CPPUNIT_ASSERT_EQUAL( 0, symlink(tempdir1.c_str(), tempdir2.c_str()) ); wxON_BLOCK_EXIT1( wxRemoveFile, tempdir2 ); wxFileName fn3(tempdir1, "foo"); wxFileName fn4(tempdir2, "foo"); // These files have different paths, hence are different. CPPUNIT_ASSERT( !fn3.SameAs(fn4) ); // Create and close a file to trigger creating it. wxFile(fn3.GetFullPath(), wxFile::write); // Now that both files do exist we should be able to detect that they are // actually the same file. CPPUNIT_ASSERT( fn3.SameAs(fn4) ); #endif // __UNIX__ }
void test (void) { a_t g; a_t *h, j; h = e; j = *h; if (e == (a_t *) 1) { a_t k = {fn3 (j)}; fn4 (j); long l; g = foo((long long)b << 2 | l); k = g; if (j.a != k.a) { a_t m = g; int n = m.a, o = m.a >> 32; asm ("# %0 %1 %2 %3" : "=m"(*a), "+A"(f) : "b"(n), "c"(o)); }
void fn1 (int p1, int p2) { int o = a; for (; f; f++) { int p; if (e[h]) continue; if (fn2 (o, d, l, n, p1, i, j, k, 0==0)) continue; p = p2; if (b[g].escape) p++; fn3 ("", c, m); if (k) fn4 (p); } }
int main() { // struct timeval tvBegin, tvEnd, tvDiff; // //without_openmp // gettimeofday(&tvBegin, NULL); // timeval_print(&tvBegin); // without_openmp(); // gettimeofday(&tvEnd, NULL); // timeval_subtract(&tvDiff, &tvEnd, &tvBegin); // printf("without_openmp: %ld.%06ld\n", tvDiff.tv_sec, tvDiff.tv_usec); // //with_openmp // gettimeofday(&tvBegin, NULL); // timeval_print(&tvBegin); // with_openmp(); // gettimeofday(&tvEnd, NULL); // timeval_subtract(&tvDiff, &tvEnd, &tvBegin); // printf("with_openmp: %ld.%06ld\n", tvDiff.tv_sec, tvDiff.tv_usec); int x[100],y,z,k; #pragma omp parallel shared(x,y,z) num_threads(2) { int tid= omp_get_thread_num(); if(tid==0) { y = fn1(tid); } else { z = fn2(tid); } #pragma omp barrier #pragma omp for for (k=0; k<100; k++) { x[k] = y+z+fn3(k)+fn4(k); } } return 0; }
int main () { float a[10]; float aa[10][10]; fn1 (a); CHECK (i == 0); fn2 (a); CHECK (i == 2); fn3 (a); CHECK (i == 3); fn4 (a); CHECK (i == 4); fn5 (aa); CHECK (i == 5); CHECK (j == 10); fn6 (aa); CHECK (i == 7); CHECK (j == 9); }
int main () { int ovf; if (fn1 (-10, __INT_MAX__) != (int) (-10U - __INT_MAX__) || fn2 (0, 0) != 0 || fn2 (32, 16383) != (short int) 524256ULL) __builtin_abort (); #if __SIZEOF_INT__ > __SIZEOF_SHORT__ && __SIZEOF_INT__ > 1 if (fn3 (__SCHAR_MAX__, (unsigned short) ~0, &ovf) != (int) (__SCHAR_MAX__ + (unsigned short) ~0) || ovf || fn3 (-__SCHAR_MAX__ - 1, 0, &ovf) != (int) (-__SCHAR_MAX__ - 1) || ovf) __builtin_abort (); #endif if (fn4 (65535, 0, &ovf) != 65535L * -32768 || ovf) __builtin_abort (); #if __SIZEOF_INT__ > 1 if (fn5 (0, 0, &ovf) != (signed char) (__SCHAR_MAX__ / 4 * 5) || !ovf || fn5 (63, 3, &ovf) != (signed char) ((__SCHAR_MAX__ / 4 + 63) * 8) || !ovf) __builtin_abort (); #endif if (fn6 (0, 0, &ovf) != (unsigned char) ~0 - 66 || ovf || fn6 (63, 3, &ovf) != (unsigned char) ~0 || ovf) __builtin_abort (); if (fn7 (0, 0, &ovf) != 0 || !ovf || fn7 (63, 3, &ovf) != 18 || !ovf) __builtin_abort (); return 0; }
int main() { if (fn4(0, 0) != 1) __builtin_abort (); return 0; }
static inline __attribute__ ((always_inline)) S3 * fn3 (S3 *p) { return (S3 *) ((char *) p + fn4 (p->s9)); }
static inline constexpr bool fn5 (const char *const x) { return fn2 (x[0]) ? fn4 (x) : false; }
void fn1 (A &, T) { fn3 (); fn4 (); fn2 (); }
for (int i = 0; i < 10; ++i) { switch (i) { case 5: return i; default: continue; } while (1) { } } return 0; } static_assert (fn4 () == 5, ""); constexpr int fn5 () noexcept { for (int i = 0; i < 10; ++i) { switch (i) { case 0: case 1: case 2: case 3: case 4: continue; default:
static constexpr bool fn4 (const char *const x) { return (x[0] == '\0') ? fn3 (&x[1]) : fn4 (&x[1]); }