gcc/tests/smoke-test/omphello.c
Václav Kadlčík 751e68f594 Align testing configuration with c9s
plans/ci.fmf we had here wasn't particularly useful, it duplicated
osci_compose_gate (see gating.yaml).

The testing configuration in c9s is at the moment in a better shape,
thanks to RHEL-69756. Let's align c10s with c9s.
2024-12-03 13:49:24 +01:00

25 lines
406 B
C

#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{
int th_id;
int nthreads;
#pragma omp parallel private(th_id)
{
th_id = omp_get_thread_num ();
printf ("Hello World from thread %d\n", th_id);
#pragma omp barrier
if (th_id == 0)
{
nthreads = omp_get_num_threads ();
printf ("There are %d threads\n", nthreads);
}
}
return EXIT_SUCCESS;
}