This patch adds diagnostic for additional code alongside a nested teams in a target region. The diagnostic is happening soon after parsing such that expressions in clauses are not yet expanded - those would end up before TEAMS and can be very complicated (e.g. assume an allocatable-returning function). (The patch diagnoses it in openmp.cc; after trans-openmp.cc it would already be to late.) Comments, remarks, suggestions? Tobias PS: Something similar is also needed for C/C++ but there templates and lambda functions might make it harder to implement. In any case, it has to be done in the FE. Tracked at PR71065 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955