]> granicus.if.org Git - clang/commitdiff
[OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392,
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 8 Jul 2019 15:45:24 +0000 (15:45 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 8 Jul 2019 15:45:24 +0000 (15:45 +0000)
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365334 91177308-0d34-0410-b5e6-96231b3b80d8

484 files changed:
test/OpenMP/allocate_allocator_messages.cpp
test/OpenMP/atomic_messages.c
test/OpenMP/atomic_messages.cpp
test/OpenMP/cancel_if_messages.cpp
test/OpenMP/cancel_messages.cpp
test/OpenMP/critical_messages.cpp
test/OpenMP/declare_reduction_messages.c
test/OpenMP/declare_reduction_messages.cpp
test/OpenMP/distribute_collapse_messages.cpp
test/OpenMP/distribute_dist_schedule_messages.cpp
test/OpenMP/distribute_firstprivate_messages.cpp
test/OpenMP/distribute_parallel_for_collapse_messages.cpp
test/OpenMP/distribute_parallel_for_copyin_messages.cpp
test/OpenMP/distribute_parallel_for_default_messages.cpp
test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp
test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp
test/OpenMP/distribute_parallel_for_if_messages.cpp
test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp
test/OpenMP/distribute_parallel_for_messages.cpp
test/OpenMP/distribute_parallel_for_num_threads_messages.cpp
test/OpenMP/distribute_parallel_for_private_messages.cpp
test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp
test/OpenMP/distribute_parallel_for_reduction_messages.cpp
test/OpenMP/distribute_parallel_for_schedule_messages.cpp
test/OpenMP/distribute_parallel_for_shared_messages.cpp
test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp
test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp
test/OpenMP/distribute_parallel_for_simd_default_messages.cpp
test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp
test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp
test/OpenMP/distribute_parallel_for_simd_if_messages.cpp
test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp
test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp
test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp
test/OpenMP/distribute_parallel_for_simd_misc_messages.c
test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp
test/OpenMP/distribute_parallel_for_simd_private_messages.cpp
test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp
test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp
test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp
test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
test/OpenMP/distribute_private_messages.cpp
test/OpenMP/distribute_simd_aligned_messages.cpp
test/OpenMP/distribute_simd_collapse_messages.cpp
test/OpenMP/distribute_simd_dist_schedule_messages.cpp
test/OpenMP/distribute_simd_firstprivate_messages.cpp
test/OpenMP/distribute_simd_lastprivate_messages.cpp
test/OpenMP/distribute_simd_linear_messages.cpp
test/OpenMP/distribute_simd_loop_messages.cpp
test/OpenMP/distribute_simd_misc_messages.c
test/OpenMP/distribute_simd_private_messages.cpp
test/OpenMP/distribute_simd_reduction_messages.cpp
test/OpenMP/distribute_simd_safelen_messages.cpp
test/OpenMP/distribute_simd_simdlen_messages.cpp
test/OpenMP/flush_messages.cpp
test/OpenMP/for_collapse_messages.cpp
test/OpenMP/for_firstprivate_messages.cpp
test/OpenMP/for_lastprivate_messages.cpp
test/OpenMP/for_linear_messages.cpp
test/OpenMP/for_loop_messages.cpp
test/OpenMP/for_misc_messages.c
test/OpenMP/for_private_messages.cpp
test/OpenMP/for_reduction_messages.cpp
test/OpenMP/for_schedule_messages.cpp
test/OpenMP/for_simd_aligned_messages.cpp
test/OpenMP/for_simd_collapse_messages.cpp
test/OpenMP/for_simd_firstprivate_messages.cpp
test/OpenMP/for_simd_lastprivate_messages.cpp
test/OpenMP/for_simd_linear_messages.cpp
test/OpenMP/for_simd_loop_messages.cpp
test/OpenMP/for_simd_misc_messages.c
test/OpenMP/for_simd_private_messages.cpp
test/OpenMP/for_simd_reduction_messages.cpp
test/OpenMP/for_simd_safelen_messages.cpp
test/OpenMP/for_simd_schedule_messages.cpp
test/OpenMP/for_simd_simdlen_messages.cpp
test/OpenMP/master_messages.cpp
test/OpenMP/ordered_messages.cpp
test/OpenMP/parallel_copyin_messages.cpp
test/OpenMP/parallel_default_messages.cpp
test/OpenMP/parallel_firstprivate_messages.cpp
test/OpenMP/parallel_for_collapse_messages.cpp
test/OpenMP/parallel_for_copyin_messages.cpp
test/OpenMP/parallel_for_default_messages.cpp
test/OpenMP/parallel_for_firstprivate_messages.cpp
test/OpenMP/parallel_for_if_messages.cpp
test/OpenMP/parallel_for_lastprivate_messages.cpp
test/OpenMP/parallel_for_linear_messages.cpp
test/OpenMP/parallel_for_loop_messages.cpp
test/OpenMP/parallel_for_messages.cpp
test/OpenMP/parallel_for_misc_messages.c
test/OpenMP/parallel_for_num_threads_messages.cpp
test/OpenMP/parallel_for_ordered_messages.cpp
test/OpenMP/parallel_for_private_messages.cpp
test/OpenMP/parallel_for_proc_bind_messages.cpp
test/OpenMP/parallel_for_reduction_messages.cpp
test/OpenMP/parallel_for_schedule_messages.cpp
test/OpenMP/parallel_for_simd_aligned_messages.cpp
test/OpenMP/parallel_for_simd_collapse_messages.cpp
test/OpenMP/parallel_for_simd_copyin_messages.cpp
test/OpenMP/parallel_for_simd_default_messages.cpp
test/OpenMP/parallel_for_simd_firstprivate_messages.cpp
test/OpenMP/parallel_for_simd_if_messages.cpp
test/OpenMP/parallel_for_simd_lastprivate_messages.cpp
test/OpenMP/parallel_for_simd_linear_messages.cpp
test/OpenMP/parallel_for_simd_loop_messages.cpp
test/OpenMP/parallel_for_simd_messages.cpp
test/OpenMP/parallel_for_simd_misc_messages.c
test/OpenMP/parallel_for_simd_num_threads_messages.cpp
test/OpenMP/parallel_for_simd_private_messages.cpp
test/OpenMP/parallel_for_simd_proc_bind_messages.cpp
test/OpenMP/parallel_for_simd_reduction_messages.cpp
test/OpenMP/parallel_for_simd_safelen_messages.cpp
test/OpenMP/parallel_for_simd_schedule_messages.cpp
test/OpenMP/parallel_for_simd_simdlen_messages.cpp
test/OpenMP/parallel_if_messages.cpp
test/OpenMP/parallel_messages.cpp
test/OpenMP/parallel_num_threads_messages.cpp
test/OpenMP/parallel_private_messages.cpp
test/OpenMP/parallel_proc_bind_messages.cpp
test/OpenMP/parallel_reduction_messages.cpp
test/OpenMP/parallel_sections_copyin_messages.cpp
test/OpenMP/parallel_sections_default_messages.cpp
test/OpenMP/parallel_sections_firstprivate_messages.cpp
test/OpenMP/parallel_sections_if_messages.cpp
test/OpenMP/parallel_sections_lastprivate_messages.cpp
test/OpenMP/parallel_sections_messages.cpp
test/OpenMP/parallel_sections_misc_messages.c
test/OpenMP/parallel_sections_num_threads_messages.cpp
test/OpenMP/parallel_sections_private_messages.cpp
test/OpenMP/parallel_sections_proc_bind_messages.cpp
test/OpenMP/parallel_sections_reduction_messages.cpp
test/OpenMP/parallel_sections_shared_messages.cpp
test/OpenMP/parallel_shared_messages.cpp
test/OpenMP/requires_messages.cpp
test/OpenMP/sections_firstprivate_messages.cpp
test/OpenMP/sections_lastprivate_messages.cpp
test/OpenMP/sections_misc_messages.c
test/OpenMP/sections_private_messages.cpp
test/OpenMP/sections_reduction_messages.cpp
test/OpenMP/simd_aligned_messages.cpp
test/OpenMP/simd_collapse_messages.cpp
test/OpenMP/simd_lastprivate_messages.cpp
test/OpenMP/simd_linear_messages.cpp
test/OpenMP/simd_loop_messages.cpp
test/OpenMP/simd_misc_messages.c
test/OpenMP/simd_private_messages.cpp
test/OpenMP/simd_reduction_messages.cpp
test/OpenMP/simd_safelen_messages.cpp
test/OpenMP/simd_simdlen_messages.cpp
test/OpenMP/single_copyprivate_messages.cpp
test/OpenMP/single_firstprivate_messages.cpp
test/OpenMP/single_misc_messages.c
test/OpenMP/single_private_messages.cpp
test/OpenMP/target_data_device_messages.cpp
test/OpenMP/target_data_if_messages.cpp
test/OpenMP/target_data_messages.c
test/OpenMP/target_data_use_device_ptr_messages.cpp
test/OpenMP/target_defaultmap_messages.cpp
test/OpenMP/target_depend_messages.cpp
test/OpenMP/target_device_messages.cpp
test/OpenMP/target_enter_data_depend_messages.cpp
test/OpenMP/target_enter_data_device_messages.cpp
test/OpenMP/target_enter_data_if_messages.cpp
test/OpenMP/target_enter_data_map_messages.c
test/OpenMP/target_enter_data_nowait_messages.cpp
test/OpenMP/target_exit_data_depend_messages.cpp
test/OpenMP/target_exit_data_device_messages.cpp
test/OpenMP/target_exit_data_if_messages.cpp
test/OpenMP/target_exit_data_map_messages.c
test/OpenMP/target_exit_data_nowait_messages.cpp
test/OpenMP/target_firstprivate_messages.cpp
test/OpenMP/target_if_messages.cpp
test/OpenMP/target_is_device_ptr_messages.cpp
test/OpenMP/target_map_messages.cpp
test/OpenMP/target_nowait_messages.cpp
test/OpenMP/target_parallel_default_messages.cpp
test/OpenMP/target_parallel_defaultmap_messages.cpp
test/OpenMP/target_parallel_depend_messages.cpp
test/OpenMP/target_parallel_device_messages.cpp
test/OpenMP/target_parallel_firstprivate_messages.cpp
test/OpenMP/target_parallel_for_collapse_messages.cpp
test/OpenMP/target_parallel_for_default_messages.cpp
test/OpenMP/target_parallel_for_defaultmap_messages.cpp
test/OpenMP/target_parallel_for_depend_messages.cpp
test/OpenMP/target_parallel_for_device_messages.cpp
test/OpenMP/target_parallel_for_firstprivate_messages.cpp
test/OpenMP/target_parallel_for_if_messages.cpp
test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp
test/OpenMP/target_parallel_for_lastprivate_messages.cpp
test/OpenMP/target_parallel_for_linear_messages.cpp
test/OpenMP/target_parallel_for_loop_messages.cpp
test/OpenMP/target_parallel_for_map_messages.cpp
test/OpenMP/target_parallel_for_messages.cpp
test/OpenMP/target_parallel_for_misc_messages.c
test/OpenMP/target_parallel_for_nowait_messages.cpp
test/OpenMP/target_parallel_for_num_threads_messages.cpp
test/OpenMP/target_parallel_for_ordered_messages.cpp
test/OpenMP/target_parallel_for_private_messages.cpp
test/OpenMP/target_parallel_for_proc_bind_messages.cpp
test/OpenMP/target_parallel_for_reduction_messages.cpp
test/OpenMP/target_parallel_for_schedule_messages.cpp
test/OpenMP/target_parallel_for_simd_aligned_messages.cpp
test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
test/OpenMP/target_parallel_for_simd_default_messages.cpp
test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp
test/OpenMP/target_parallel_for_simd_depend_messages.cpp
test/OpenMP/target_parallel_for_simd_device_messages.cpp
test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp
test/OpenMP/target_parallel_for_simd_if_messages.cpp
test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp
test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp
test/OpenMP/target_parallel_for_simd_linear_messages.cpp
test/OpenMP/target_parallel_for_simd_loop_messages.cpp
test/OpenMP/target_parallel_for_simd_map_messages.cpp
test/OpenMP/target_parallel_for_simd_messages.cpp
test/OpenMP/target_parallel_for_simd_misc_messages.c
test/OpenMP/target_parallel_for_simd_nowait_messages.cpp
test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp
test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
test/OpenMP/target_parallel_for_simd_private_messages.cpp
test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp
test/OpenMP/target_parallel_for_simd_reduction_messages.cpp
test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
test/OpenMP/target_parallel_for_simd_schedule_messages.cpp
test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
test/OpenMP/target_parallel_if_messages.cpp
test/OpenMP/target_parallel_is_device_ptr_messages.cpp
test/OpenMP/target_parallel_map_messages.cpp
test/OpenMP/target_parallel_messages.cpp
test/OpenMP/target_parallel_nowait_messages.cpp
test/OpenMP/target_parallel_num_threads_messages.cpp
test/OpenMP/target_parallel_private_messages.cpp
test/OpenMP/target_parallel_proc_bind_messages.cpp
test/OpenMP/target_parallel_reduction_messages.cpp
test/OpenMP/target_parallel_shared_messages.cpp
test/OpenMP/target_private_messages.cpp
test/OpenMP/target_reduction_messages.cpp
test/OpenMP/target_simd_aligned_messages.cpp
test/OpenMP/target_simd_collapse_messages.cpp
test/OpenMP/target_simd_defaultmap_messages.cpp
test/OpenMP/target_simd_depend_messages.cpp
test/OpenMP/target_simd_device_messages.cpp
test/OpenMP/target_simd_firstprivate_messages.cpp
test/OpenMP/target_simd_if_messages.cpp
test/OpenMP/target_simd_is_device_ptr_messages.cpp
test/OpenMP/target_simd_lastprivate_messages.cpp
test/OpenMP/target_simd_linear_messages.cpp
test/OpenMP/target_simd_loop_messages.cpp
test/OpenMP/target_simd_map_messages.cpp
test/OpenMP/target_simd_messages.cpp
test/OpenMP/target_simd_misc_messages.c
test/OpenMP/target_simd_nowait_messages.cpp
test/OpenMP/target_simd_private_messages.cpp
test/OpenMP/target_simd_reduction_messages.cpp
test/OpenMP/target_simd_safelen_messages.cpp
test/OpenMP/target_simd_simdlen_messages.cpp
test/OpenMP/target_teams_default_messages.cpp
test/OpenMP/target_teams_defaultmap_messages.cpp
test/OpenMP/target_teams_depend_messages.cpp
test/OpenMP/target_teams_device_messages.cpp
test/OpenMP/target_teams_distribute_collapse_messages.cpp
test/OpenMP/target_teams_distribute_default_messages.cpp
test/OpenMP/target_teams_distribute_defaultmap_messages.cpp
test/OpenMP/target_teams_distribute_depend_messages.cpp
test/OpenMP/target_teams_distribute_device_messages.cpp
test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp
test/OpenMP/target_teams_distribute_firstprivate_messages.cpp
test/OpenMP/target_teams_distribute_if_messages.cpp
test/OpenMP/target_teams_distribute_lastprivate_messages.cpp
test/OpenMP/target_teams_distribute_loop_messages.cpp
test/OpenMP/target_teams_distribute_map_messages.cpp
test/OpenMP/target_teams_distribute_messages.cpp
test/OpenMP/target_teams_distribute_misc_messages.c
test/OpenMP/target_teams_distribute_nowait_messages.cpp
test/OpenMP/target_teams_distribute_num_teams_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp
test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp
test/OpenMP/target_teams_distribute_private_messages.cpp
test/OpenMP/target_teams_distribute_reduction_messages.cpp
test/OpenMP/target_teams_distribute_shared_messages.cpp
test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp
test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp
test/OpenMP/target_teams_distribute_simd_depend_messages.cpp
test/OpenMP/target_teams_distribute_simd_device_messages.cpp
test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp
test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp
test/OpenMP/target_teams_distribute_simd_if_messages.cpp
test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp
test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp
test/OpenMP/target_teams_distribute_simd_linear_messages.cpp
test/OpenMP/target_teams_distribute_simd_loop_messages.cpp
test/OpenMP/target_teams_distribute_simd_map_messages.cpp
test/OpenMP/target_teams_distribute_simd_messages.cpp
test/OpenMP/target_teams_distribute_simd_misc_messages.c
test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp
test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp
test/OpenMP/target_teams_distribute_simd_private_messages.cpp
test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp
test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
test/OpenMP/target_teams_distribute_simd_shared_messages.cpp
test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp
test/OpenMP/target_teams_firstprivate_messages.cpp
test/OpenMP/target_teams_if_messages.cpp
test/OpenMP/target_teams_is_device_ptr_messages.cpp
test/OpenMP/target_teams_map_messages.cpp
test/OpenMP/target_teams_messages.cpp
test/OpenMP/target_teams_nowait_messages.cpp
test/OpenMP/target_teams_num_teams_messages.cpp
test/OpenMP/target_teams_private_messages.cpp
test/OpenMP/target_teams_reduction_messages.cpp
test/OpenMP/target_teams_shared_messages.cpp
test/OpenMP/target_teams_thread_limit_messages.cpp
test/OpenMP/target_update_depend_messages.cpp
test/OpenMP/target_update_device_messages.cpp
test/OpenMP/target_update_from_messages.cpp
test/OpenMP/target_update_if_messages.cpp
test/OpenMP/target_update_messages.cpp
test/OpenMP/target_update_nowait_messages.cpp
test/OpenMP/target_update_to_messages.cpp
test/OpenMP/task_default_messages.cpp
test/OpenMP/task_depend_messages.cpp
test/OpenMP/task_final_messages.cpp
test/OpenMP/task_firstprivate_messages.cpp
test/OpenMP/task_if_messages.cpp
test/OpenMP/task_messages.cpp
test/OpenMP/task_priority_messages.cpp
test/OpenMP/task_private_messages.cpp
test/OpenMP/task_shared_messages.cpp
test/OpenMP/taskgroup_messages.cpp
test/OpenMP/taskgroup_task_reduction_messages.cpp
test/OpenMP/taskloop_collapse_messages.cpp
test/OpenMP/taskloop_final_messages.cpp
test/OpenMP/taskloop_firstprivate_messages.cpp
test/OpenMP/taskloop_grainsize_messages.cpp
test/OpenMP/taskloop_in_reduction_messages.cpp
test/OpenMP/taskloop_lastprivate_messages.cpp
test/OpenMP/taskloop_loop_messages.cpp
test/OpenMP/taskloop_misc_messages.c
test/OpenMP/taskloop_num_tasks_messages.cpp
test/OpenMP/taskloop_priority_messages.cpp
test/OpenMP/taskloop_private_messages.cpp
test/OpenMP/taskloop_reduction_messages.cpp
test/OpenMP/taskloop_simd_aligned_messages.cpp
test/OpenMP/taskloop_simd_collapse_messages.cpp
test/OpenMP/taskloop_simd_final_messages.cpp
test/OpenMP/taskloop_simd_firstprivate_messages.cpp
test/OpenMP/taskloop_simd_grainsize_messages.cpp
test/OpenMP/taskloop_simd_in_reduction_messages.cpp
test/OpenMP/taskloop_simd_lastprivate_messages.cpp
test/OpenMP/taskloop_simd_linear_messages.cpp
test/OpenMP/taskloop_simd_loop_messages.cpp
test/OpenMP/taskloop_simd_misc_messages.c
test/OpenMP/taskloop_simd_num_tasks_messages.cpp
test/OpenMP/taskloop_simd_priority_messages.cpp
test/OpenMP/taskloop_simd_private_messages.cpp
test/OpenMP/taskloop_simd_reduction_messages.cpp
test/OpenMP/taskloop_simd_safelen_messages.cpp
test/OpenMP/taskloop_simd_simdlen_messages.cpp
test/OpenMP/taskwait_messages.cpp
test/OpenMP/taskyield_messages.cpp
test/OpenMP/teams_default_messages.cpp
test/OpenMP/teams_distribute_collapse_messages.cpp
test/OpenMP/teams_distribute_default_messages.cpp
test/OpenMP/teams_distribute_dist_schedule_messages.cpp
test/OpenMP/teams_distribute_firstprivate_messages.cpp
test/OpenMP/teams_distribute_lastprivate_messages.cpp
test/OpenMP/teams_distribute_loop_messages.cpp
test/OpenMP/teams_distribute_num_teams_messages.cpp
test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp
test/OpenMP/teams_distribute_parallel_for_default_messages.cpp
test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp
test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp
test/OpenMP/teams_distribute_parallel_for_if_messages.cpp
test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp
test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp
test/OpenMP/teams_distribute_parallel_for_messages.cpp
test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp
test/OpenMP/teams_distribute_parallel_for_private_messages.cpp
test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp
test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp
test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp
test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp
test/OpenMP/teams_distribute_private_messages.cpp
test/OpenMP/teams_distribute_reduction_messages.cpp
test/OpenMP/teams_distribute_shared_messages.cpp
test/OpenMP/teams_distribute_simd_aligned_messages.cpp
test/OpenMP/teams_distribute_simd_collapse_messages.cpp
test/OpenMP/teams_distribute_simd_default_messages.cpp
test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp
test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp
test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp
test/OpenMP/teams_distribute_simd_linear_messages.cpp
test/OpenMP/teams_distribute_simd_loop_messages.cpp
test/OpenMP/teams_distribute_simd_messages.cpp
test/OpenMP/teams_distribute_simd_num_teams_messages.cpp
test/OpenMP/teams_distribute_simd_private_messages.cpp
test/OpenMP/teams_distribute_simd_reduction_messages.cpp
test/OpenMP/teams_distribute_simd_safelen_messages.cpp
test/OpenMP/teams_distribute_simd_shared_messages.cpp
test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp
test/OpenMP/teams_distribute_thread_limit_messages.cpp
test/OpenMP/teams_firstprivate_messages.cpp
test/OpenMP/teams_messages.cpp
test/OpenMP/teams_num_teams_messages.cpp
test/OpenMP/teams_private_messages.cpp
test/OpenMP/teams_reduction_messages.cpp
test/OpenMP/teams_shared_messages.cpp
test/OpenMP/teams_thread_limit_messages.cpp

index 5ba4f2a506b1eb46d5d24c5fbc48716cb933e107..fced4cae9d5294261fc2f3e161f7252862a552e5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 struct St{
  int a;
index 92b7cd5b6aecf7ed54e3bdd65ba1bed77d6151b4..bace18aba9e4c33bbf51b0ad78bba273ddd67281 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 int foo() {
 L1:
index d7fa8c9e07587aefd7006c6cf39bc122e2589f7e..e4ca628075f0ca947e831e215074db5c8148d445 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 int foo() {
 L1:
index dc24fa4c997931c6e2bc42603e531d25a02b552e..3d629c927e9072d4b09a2b8da1e0d65728065a00 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel
   {
     #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
@@ -20,7 +21,7 @@ int tmain(T argc, S **argv) {
     #pragma omp cancel parallel if () // expected-error {{expected expression}}
     #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
     #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
-    #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
+    #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] + z)
     #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
     #pragma omp cancel parallel if (S) // expected-error {{'S' does not refer to a value}}
     #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -40,6 +41,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp parallel
   {
     #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}}
@@ -47,7 +49,7 @@ int main(int argc, char **argv) {
     #pragma omp cancel parallel if () // expected-error {{expected expression}}
     #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
     #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}}
-    #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2])
+    #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] - z)
     #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}}
     #pragma omp cancel parallel if (S1) // expected-error {{'S1' does not refer to a value}}
     #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
index df6dcdf2ff6194d8d89a7ed1136c46aed6989faa..fd19f1f373ef9b1b906f173aa11a305c7d0e0e1a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 int main(int argc, char **argv) {
 #pragma omp cancellation       // expected-error {{expected an OpenMP directive}}
index 9222233d4a6e0a33e13babf74d3a449756868770..1eec70e283337a3ce00287ce0b80812fbffe18a0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 int foo();
 
index 27e9e6e2e250b9b29486315d23e65228eb1b89ab..4a0d6ef4028d3daf0433f5ff9e4e5a563664c6da 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 int temp; // expected-note 6 {{'temp' declared here}}
 
index 0a79d6a0a6433b23f34aca53f60f03558e07d74c..a674af7151da7ed5d644caacb2a6894c39c795ea 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s -Wuninitialized
 
 int temp; // expected-note 7 {{'temp' declared here}}
 
index e4164daaed1413dcbad584419855a6f09b1e0800..33035f2bc220bb7ce6b8ce83110a6f8fae31e060 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 9f91f41f864057bc18471d51b07f48eaa0aa1212..cd232f40feb43416ae59a44ba4d4d5e8bb8b5626 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
   #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -31,7 +31,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
-  #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
+  #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
   for (int i = 0; i < 10; ++i) foo();
@@ -41,6 +41,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -55,7 +56,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
-  #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
+  #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 -z ) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
   #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
   for (int i = 0; i < 10; ++i) foo();
index e6dfd71c55dba9a36f74479a44e8a58ea8f73c13..c13f142f30d22a45f4192514b7076eab47d7cbf7 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration
 extern S1 a;
 class S2 {
   mutable int a;
-  
+
 public:
   S2() : a(0) {}
   S2(const S2 &s2) : a(s2.a) {}
@@ -26,7 +26,7 @@ const S2 ba[5];
 class S3 {
   int a;
   S3 &operator=(const S3 &s3);
-  
+
 public:
   S3() : a(0) {} // expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
   S3(S3 &s3) : a(s3.a) {} // expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (i = 0; i < argc; ++i) foo();
@@ -111,7 +111,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target
   #pragma omp teams
-  #pragma omp distribute firstprivate(da)
+  #pragma omp distribute firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target
   #pragma omp teams
index c3298f1756d2b1ebd5d370b82c1808f6918a652a..f0bd4c28403cda561ad01aa8c51cf2d2e503c546 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 5182f24bdb14874c63a740ca32293109972962c4..26bf6c61288301e4588086abe672cfcc9bdea787 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index 892772b1e8fa581a538e2c5af133f057368ba99b..0629ba096d0c2562d79065b7528994c5775836a4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index adcef0bab92a0da3338284ed0173f7f28fcf1f92..07e7704dffded694783ae8d27efe67805ada0bce 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -13,10 +13,9 @@ struct S1; // expected-note {{declared here}} expected-note {{declared here}}
 
 template <class T, int N>
 T tmain(T argc) {
-  T b = argc, c, d, e, f, g;
+  T b = argc, c, d, e, f, g, z;
   char ** argv;
   static T a;
-// CHECK: static T a;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +46,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -61,6 +60,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
index 3cebf0cd675cdd2f2d199553ef8cc93939a37677..1678a27f213b79e36c6dafa422485cd3675d7b0d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -126,7 +126,7 @@ int foomain(int argc, char **argv) {
     ++k;
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp distribute parallel for firstprivate(k, h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -294,7 +294,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp distribute parallel for firstprivate(k, h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}}
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target
index 85e78d0b92534de9531f8bd033c7ff36f8845a7e..a06ff2377c043ac1f438ad9803d196c1bcfd79d4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
@@ -56,7 +56,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for if(argc)
+#pragma omp distribute parallel for if(argc+z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}}
@@ -158,7 +158,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for if(parallel : argc)
+#pragma omp distribute parallel for if(parallel : argc-z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
index 4039982ef5d449918259d37dcd11963f42e75e9a..b91f41e6b660c4ab5677751aca11cd9610830576 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 6bda5d106b7806498de017076f180abad327cb82..248d09b8cc6f679f5900fda86806e0d06c7bd833 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 110f5d70f8d173de5e6f62c8a4c6a2da616d6af9..ab301cc517207fbd87b6d20ae934ed1f96620204 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for num_threads (argc)
+#pragma omp distribute parallel for num_threads (argc + z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
+#pragma omp distribute parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
index 6fadc12442af3c251c9bac12c103a30a9afd7b3c..729a4a75596d53da4746ee9c808fb46861ebd495 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index febf4b05643a30b4effc89594812bc8ec09fad4b..5c29a184ebaa4dedf81fdbb70a35c99109a7a5f5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 99f928a3456e2bea6d9f441d99406078e098d468..75b4112feee0e36b9b39249bb6844a537a6b049b 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -176,7 +176,7 @@ T tmain(T argc) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp distribute parallel for reduction(+ : ba, z) // expected-error {{const-qualified variable cannot be reduction}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target
@@ -272,7 +272,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -434,7 +434,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel private(fl)
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for reduction(+ : fl)
+#pragma omp distribute parallel for reduction(+ : fl, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel reduction(* : fl)
index 1f521d4f6fd6f090341a5abf84b6da647084090e..80dc23396108685a6b61c32cfeea44d78366a4d5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
@@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
+#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
   // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}}
@@ -124,7 +126,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}}
   // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 6700b80cad3dfcce3097527329d96a0c7283174c..d5a68f65b7b420cf022d7c5a6fbec9b0625fc40e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 
 struct S1; // expected-note 2 {{declared here}}
index 40d72418c7214019fcd8df12241ce59d316d2117..27f5f60c1d22f8bf14bab5415711c1e64a9c0796 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 9399594be20c213bbec1838d8283f5db08be1aba..a3e324d32bc69b52e85d625bde9fffe52db7e23d 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 2d72925518d4cb2c52cf9e86a9f1585d7accf72c..e382a221143c6fa9a84bde05486a88512fd656ee 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -126,7 +126,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}}
index 3f00436181e91ea87f0430dfaedf96c214711707..b9c5546ec5d9555d7c9707c8b837acd8e4322c9e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index f029b0e187fa8cbe0f01600734f1d0814a141162..ed7b19111dee8a7b14441620eac4082d13f7eaa8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T k;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -61,6 +61,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int k;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
index f574335baf8b65a8c874eaefe1158f8bcf3d7338..aa33807c424db09730bd26ef7f5f973acf75760e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -101,7 +101,7 @@ int foomain(int argc, char **argv) {
     ++k;
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd firstprivate(argc)
+#pragma omp distribute parallel for simd firstprivate(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -248,7 +248,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd firstprivate(ba) // OK
+#pragma omp distribute parallel for simd firstprivate(ba, z) // OK
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target
index 0f9e12381f0e50eb29a4ddd5d8b6afd13a4d114f..7769272026e6b37ee901de1560feb229c1f93ad2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, k;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
@@ -32,7 +32,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -95,7 +95,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, k;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
@@ -114,7 +114,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
index 71658a665061942ba4b67019dd466096eb710d7e..110e102e64b896a0f28f4f59f30cb2da856b78ac 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
     ++k;
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd lastprivate(argc)
+#pragma omp distribute parallel for simd lastprivate(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd lastprivate(ba)
+#pragma omp distribute parallel for simd lastprivate(ba, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target
index 8f2df4215bc14db216006a4d99828d3360b51aa7..e8521c06d93004284ba8c0b093398405cee320a2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
index 2c0d7ab742858863942d58df7d73200768164915..ef17dd499d2ee299dd07952eb8617e59f9b69552 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index c2bee7ffa70e08016aa8eabcc6ca4ece7fea628e..e4cefcbf72111f94cc6efb8a1c2df3654b5402c5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}}
 #pragma omp distribute parallel for simd
index 5f5165d979c2649ae50461b5dcd99f7b0dbb1016..9f9de197aca0d23ef4998dbf8effc75bf7fd89be 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -63,7 +63,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
+#pragma omp distribute parallel for simd num_threads (z/argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams
index 50a7fb5ac935a27e141d1301ece8521fe44410e3..615a45f584bab8a28fd7e585c54bfb8acc227bab 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index d81f7d99207178058362f3d06524179773554acc..d159ca94e95230875830e64bbde811ffff898b04 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 150f50171a0510ad0085f587391f15974147fad9..0b27fe25e42374e93b070ed0d33f118297f395cc 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -151,7 +151,7 @@ T tmain(T argc) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd reduction(&& : argc)
+#pragma omp distribute parallel for simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target
@@ -272,7 +272,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -400,7 +400,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp distribute parallel for simd reduction(+ : z, o) // expected-error {{no viable overloaded '='}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target
index 7e76c1f6ab2496d8db63143d5be76e82e60ec5d6..e39b5d9fbc599bb9f2bfb13a99828c2865212700 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 8a5ffd159425a93616d97f4bde9d2830829abe31..84cadd41cf28d62b80ba197c14d49af2fb6e55ab 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
@@ -57,7 +58,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -86,6 +87,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target
 #pragma omp teams
 #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
@@ -124,7 +126,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 -z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}}
index d037e4cd93b06f727f8f522fd3dc29162bc8e000..8e21c07c6c49accf71a6aed555f92412111d01c8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 
 struct S1; // expected-note 2 {{declared here}}
@@ -54,7 +54,7 @@ T tmain(T argc, S **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   int acc = 0;
   int n = 1000;
@@ -103,7 +103,7 @@ T tmain(T argc, S **argv) {
 
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd shared (argc)
+#pragma omp distribute parallel for simd shared (argc, z)
   for(int k = 0 ; k < n ; k++) {
     acc++;
   }
@@ -228,7 +228,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   int acc = 0;
   int n = argc;
@@ -277,7 +277,7 @@ int main(int argc, char **argv) {
 
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute parallel for simd shared (argc)
+#pragma omp distribute parallel for simd shared (argc, z)
   for(int k = 0 ; k < n ; k++) {
     acc++;
   }
index 9c1c55203308fae1f480001be616028afed4ae0a..7cede341626e8fd6e2419362cf5afa732ca1c991 100644 (file)
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
 
 void foo() {
 }
index fe5c0257a9939bbffce0478c875d6afdc0bdb924..b3bdaffcbd1045adb4132e65e5eb54357178c7e5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -34,7 +34,7 @@ class S4 {
 public:
   S4(int v):a(v) { }
 };
-class S5 { 
+class S5 {
   int a;
   S5():a(0) {} // expected-note {{implicitly declared private here}}
 public:
index 8c4a8d956995ff75adffda6c8da90c9249afca9b..0febeed5864f0235501bde605983819b6d8d4978 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 204719a2e6d255ae4264dbbb12662f8d500bc210..2d3983cc55533b9a50613b967929094f335bc61e 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index c659abe71ba0f9d5e80676ed706d2e94db9be9ff..794681c02646c11adbadb19c5a45ec02b51e73f9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target
 #pragma omp teams
@@ -55,7 +55,7 @@ T tmain(T argc) {
 
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 #pragma omp target
 #pragma omp teams
@@ -69,6 +69,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams
 #pragma omp distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -106,7 +107,7 @@ int main(int argc, char **argv) {
 
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
index 6059415582d2f41a4f5539cdafcfc40dc1f21549..b73ecc274d0d907d128cc39d6a3a99294f6544ed 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -111,7 +111,7 @@ int foomain(int argc, char **argv) {
     ++k;
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
+#pragma omp distribute simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd firstprivate(argc)
+#pragma omp distribute simd firstprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target
index 6037551c5b4a966465800d169724421021de70ff..50a1fc387e838d1ca9a37c3451c0236ab58361d9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams
@@ -103,7 +103,7 @@ int foomain(int argc, char **argv) {
     ++k;
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd lastprivate(argc)
+#pragma omp distribute simd lastprivate(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target
index e5c2aceea8334fa48a9371ad1aa816529b990b02..53bd4c05da7c37844fc29aad3bcbc6118cf7bab5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
index b46bdad0b6414fde39c250776680cbac68f51fc8..ee57cd5af33e11c504072f3dbbbadce4a50e7bd5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 static int sii;
 // expected-note@+1 {{defined as threadprivate or thread local}}
index 2cb5e97273ca4ba139ae6a6f910abd0d965b5a62..5286e5f8d6ddd0e90160702901888300b916a0f4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute simd'}}
 #pragma omp distribute simd
index 47b1b0c74fac975b109935b4ae5c4aef90086214..95564226b812bacb99ca0ad525af0d4a62178e4b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index b1fe7f684da5b879a8e7b9cf3fa040c4209995f0..4486877025125745a1db7aafacabe164510d18c9 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -89,6 +89,7 @@ T tmain(T argc) {
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
   T i;
+  long z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -156,7 +157,7 @@ T tmain(T argc) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+#pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target
@@ -272,7 +273,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -335,7 +336,7 @@ int main(int argc, char **argv) {
     foo();
 #pragma omp target
 #pragma omp teams
-#pragma omp distribute simd reduction(&& : argc)
+#pragma omp distribute simd reduction(&& : z, argc)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target
index 30c0976368f986b5daec1d5602327485686e3d78..c28b1bf1a1ff421b2b9af2a33e78ba6bd210d013 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 30c0976368f986b5daec1d5602327485686e3d78..c28b1bf1a1ff421b2b9af2a33e78ba6bd210d013 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 36a8ef6d49226145fa0f0de0ba58fcb20bbf1219..5838e12ce8c4127ea5de156b9ab733d58edc3bf5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 struct S1 { // expected-note 2 {{declared here}}
   int a;
index 5530ddcc6a5b6ad24c5b8f82fa45c6adf367f362..ce656515b1ef2c09dbeb570320314178c8d2f0c1 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
   // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
   // expected-error@+2 2 {{expression is not an integral constant expression}}
   // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
-  #pragma omp for collapse (argc 
+  #pragma omp for collapse (argc
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
   #pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
index 22b034e0f207a4e72e48b7c6943a4c4f6cb2def6..de2ad14ae5a39cd1455ece19f20e5315557d87a6 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel
 #pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -207,7 +207,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
+#pragma omp for firstprivate(a, b, c, d, f, k) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}}
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index 40222c1f5e8d2b65a3f66e47b8ea9df4b21936f7..919b40f9ccd49171573d025524d6ddbdceb00ef0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel
 #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -112,7 +112,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp for lastprivate(k, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -163,7 +163,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel
 #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -190,7 +190,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for lastprivate(argc)
+#pragma omp for lastprivate(argc, k)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index c984aa5a9f0f01fd24bb8932c2ba5cbfa0fdb626..3a54acb26b558d948f9fd69b39d92793ffb322ab 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
@@ -104,7 +104,7 @@ S3 h;
 template<class I, class C> int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, k;
   int &j = i;
   #pragma omp for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -128,7 +128,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp for linear(e, g)
+  #pragma omp for linear(e, g, k)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -170,7 +170,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, k;
   int &j = i;
   #pragma omp for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -190,7 +190,7 @@ int main(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   // expected-error@+2 {{linear variable with incomplete type 'S1'}}
   // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
-  #pragma omp for linear(a, b)
+  #pragma omp for linear(a, b, k)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp for linear (argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
index f5ee0d44429c921bfe1fd13f8a6c3c34d58cc537..7c2663f61816f70b024e8f4a9727131c71cfbbe5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 901d66dd688cf26af8049454f8599c3d9011e467..e36a1c6db012b3bb8f0e19e95c5c0f9ac013903d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}}
 #pragma omp for
index 44a05f709ff1d0377c9247b44df8f22a8dc39bf5..877d683ce626b35c9e7194992ab9f320eb92b8a4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 397e54f1fc1d8c91f10ed8f0255ff6560314fe6b..a082e5843e327a76d07b5769ec87684852ab1edc 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                // expected-note 4 {{'j' defined here}}
   S3 &p = k;               // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -147,11 +147,11 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp for reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
@@ -245,7 +245,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;           // expected-note 2 {{'j' defined here}}
   S3 &p = k;            // expected-note 2 {{'p' defined here}}
   const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -312,7 +312,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for reduction(max : argv[1])
+#pragma omp for reduction(max : argv[1], z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
index f4b5b3a26d643200c2bd3696e9762bc41b5e9fa9..95e9a2a1ae81cdbf5f3570ab26e79f955da164e9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -45,7 +46,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2)
+  #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -82,6 +83,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -98,7 +100,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+  #pragma omp for schedule (static, 2+2-z)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
index fce9aca9989a5539ed406c58d218307e23defdba..c7122bbe4fbbf4393d567abac83fc209360a35fa 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index f5c130f30a31b8b37ba01ea8c6f0244b0a0c78d6..2781bb9d5e22ad6af60ec769e9a40c5738be290b 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b6b51d86868b5505f2bc206b273a701cb0ffd806..6dba2f81be3dd276806da70040375cb3b9a2c1ba 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index b3589d90d7a172c2591b8ba257dcf2264ceee66b..a69a3c18fb9df898535125a4cf014c21bf816601 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -160,7 +160,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for simd lastprivate(argc)
+#pragma omp for simd lastprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index ffa2233b55f8ef204824e0d1bee12a50b5f7aa62..9df53aeacaaba5311fdae28f79d276d26407d0bb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
@@ -137,8 +137,9 @@ template<class I, class C> int foomain(I argc, C **argv) {
   #pragma omp parallel
   {
     int v = 0;
+    long z;
     int i;
-    #pragma omp for simd linear(v:i)
+    #pragma omp for simd linear(z, v:i)
     for (int k = 0; k < argc; ++k) { i = k; v += i; }
   }
   #pragma omp for simd linear(j)
@@ -188,7 +189,7 @@ int main(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   // expected-error@+2 {{linear variable with incomplete type 'S1'}}
   // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
-  #pragma omp for simd linear (a, b) 
+  #pragma omp for simd linear(a, b)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -201,7 +202,7 @@ int main(int argc, char **argv) {
   #pragma omp parallel
   {
     int i;
-    #pragma omp for simd linear(i)
+    #pragma omp for simd linear(i : i)
     for (int k = 0; k < argc; ++k) ++k;
     #pragma omp for simd linear(i : 4)
     for (int k = 0; k < argc; ++k) { ++k; i += 4; }
index 29ab738dd149751c933b40c5d400cd18b86c8881..2a5a6e87f78c9ca0e0b3b3f3d9ff3e6a8e6117e4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 4da2e6bb6c15a3d33da79afa4b582c56ae81326a..bdce97431c0ab001aedf218303d49b462cb6fd58 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}}
 #pragma omp for simd
index ff3249e64ca626f1edf07476c3cdf18e32826054..0bf33797e0b9b79e3d8d77e9b7572885189ec8cd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index c4bed65d98becbfbc55fcd290a02b916a00cbd6f..9a112bc2c5aadaf1d0faf0b32dade30f27fc14b1 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -87,7 +87,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                // expected-note 4 {{'j' defined here}}
   S3 &p = k;               // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -146,7 +146,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
@@ -236,7 +236,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;           // expected-note 2 {{'j' defined here}}
   S3 &p = k;            // expected-note 2 {{'p' defined here}}
   const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -287,7 +287,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
-#pragma omp for simd reduction(&& : argc)
+#pragma omp for simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel
index 6868b938c2c2bd14b16707e0115f797f92b5db19..c97e2a951a8326b3f77b0e29f6a5cd4e9758d26d 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b330f8cfd0051dd39f70fe8c978622da67ab6bf2..08e3c022cf2d7d5ef4886975a06de6d78349916e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+  #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+  #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 86cc4690a982c3b7ba23f301339500fd17cfe253..5ae2fbbc8daeb545797d57609c8af02981fc6320 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 702da24b6311a80ab4d307e4b71fefbdaed11e3e..07c863f909935fdce4d2a493e9d7065d3bb41479 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 int foo();
 
index 294e7455af3a57c82733efc1c7b8af1289a7edbb..6404ec8bf914af6e5fee914e22df79df61f9aab6 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 int foo();
 
index 81a507addf100fe32145681106a9f5933d825b13..4064b020228a885f9318fb19114eeda624f4d305 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index 440e91b10382e2dd0c0936d47c83d8410f7b02c0..6ae0ba51ac3554955a42f79f9b2277805be37d55 100644 (file)
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 6c5a41c589cff0ee0c138e4af0ccec708f5ee145..b0f0c6a8c85506950ea652a01d7548cdd85b441a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   static int m;
   #pragma omp parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
   #pragma omp parallel firstprivate (argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
   #pragma omp parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
-  #pragma omp parallel firstprivate (d)
+  #pragma omp parallel firstprivate (z, d)
     d = 5; // expected-error {{cannot assign to variable 'd' with const-qualified type}}
   #pragma omp parallel firstprivate (argv[1]) // expected-error {{expected variable name}}
   #pragma omp parallel firstprivate(ba)
index 192fa45c904047fd0a47a9f5071aaaa5fc1218ac..d03e1b820e315c4ee09014249ed37556f8dd7cde 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 265a1953e0686294cd842f1366680f06c18b1941..af13549ecddd4fd1bc6f57a8a96c6e3eef831aca 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index 8baa2f6c04552dbdb490533bfd357ecce7e7bc08..b02fa8803a3b3ac4f151a843a7bc9ead6ab5502c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 752d0325e65f854dafa015053c030dda0d376dc8..28a21a49e60eb4126e70f33610417ae531848227 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -93,7 +93,7 @@ int foomain(int argc, char **argv) {
 #pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
index 1d83d3585d6086f7ba7155d6c157bf38bbd70718..32f9ef3a7defab609f494eafac4bb35a2437b12f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for if(argc)
+  #pragma omp parallel for if(argc/z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -55,7 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i,z;
   #pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for if(parallel : argc)
+  #pragma omp parallel for if(parallel : z*argc)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for'}}
   for (i = 0; i < argc; ++i) foo();
index 5c782a563776a4e52dc2a3ae41b599f1d592a6e1..4a7c346bbf20d3198de14686d9d3bc98a8f18ffd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -95,7 +95,7 @@ int foomain(int argc, char **argv) {
 #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp parallel for lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}}
@@ -143,7 +143,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (i = 0; i < argc; ++i)
@@ -163,7 +163,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp parallel for lastprivate(argc)
+#pragma omp parallel for lastprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
index 0dfdb3d96f3359fa53e4931fb26f40187a6b0dbe..b10557163b0ecb2b73c9c4c8c9d6b938b6a4b603 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
@@ -120,7 +120,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -140,7 +140,7 @@ int foomain(I argc, C **argv) {
 #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for linear(argc : 5)
+#pragma omp parallel for linear(argc, z : 5)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
@@ -205,7 +205,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -225,7 +225,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for linear(argc)
+#pragma omp parallel for linear(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
index 12020c37a575eae6e8df29a3db24d601730186a5..f1314943b35c17a34274388d6cc394be08002fa8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index f5aa6e66472fc47d2b1d47d5bf16f827481c84f5..b53f6fa3196f97f1d7fef8b262f27a31577117b4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 2d12ba4507276245a83d57ca8c29e9067959bcfe..946f6d58ccea324bfa7a5fa523768c85cb487c81 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
 #pragma omp parallel for
index 6f57d6e8f4594d5af576412d051c4f28e2732e5e..e689df8fc7d856070c031145a5641c1accec1085 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for num_threads (argc)
+  #pragma omp parallel for num_threads (argc+z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+  #pragma omp parallel for num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index 9681d780fb28637ecdc1f5938a11065567a726bc..027e3b0797d784727e2dbb006be61e39ec60f2a0 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 4591043bbfcddbcf7fe711eab7361b7ecc2e64f5..3f742600e1a67e30ff91897323d732a8ea5bbc12 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 0ffff89a8c956dd521d6999f52982eea43e228a8..85c6982eef47c1e58f1d24afbdeac2da80fe38ff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 87a5027f696f808f2d978d36d2cb550200d7a576..80357675171a2ce83b20fdeb7077f3a9504ce18b 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -92,7 +92,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -137,7 +137,7 @@ T tmain(T argc) {
 #pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
index dfdd36dddde1348773b48b63d9ccd3e8511017a3..04fdad1732812ba0267233b6501740901ec72253 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
+  #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -56,6 +57,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -74,7 +76,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+  #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 75f4adb00b205a582bf8b660f51d90162504d814..76c64de3fec1bb2dda9d517eade049a90d7d9569 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 39d01b8c2f6cf7aad8e1f2bcfca3f2cc73d254ef..4b2c8b577b77ec3a7951b0c079cca5156a2bb06d 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 6b492b13f7b55a204ab155cf83a681c4b18f6bb4..5214fb91a9f56dc12ac97266e51a1e48cff81936 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo() {
 }
index 7b30e4106a88d2a4c0e086aeb9b03cfeeb282b0a..570ee14bbc84b953b5e68051a8e849ae3f386ab5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo();
 
index ef3743bc79f76305b9d9519c5383ddb2ce9b5166..2cd9c065c63b8cbaaa8ab619a0e8b7d1592d1868 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
 #pragma omp parallel for simd firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for simd firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp parallel for simd firstprivate(h, z) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for simd linear(i)
@@ -154,7 +154,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (i = 0; i < argc; ++i)
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp parallel for simd firstprivate(argc)
+#pragma omp parallel for simd firstprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
index 08f8b466ed35fd00db710686b8b280db9d2231d4..aa1e302d042420748732e0ee1c9fb24d420b643d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for simd if(argc)
+  #pragma omp parallel for simd if(argc + z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -55,7 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -86,7 +86,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for simd if(parallel : argc)
+  #pragma omp parallel for simd if(parallel : argc / z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for simd'}}
   for (i = 0; i < argc; ++i) foo();
index 45cc26b074b9567091faea7fb325e5080686c453..e47a6090b620048ec05172911a105b6189043e02 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -68,7 +68,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -100,7 +100,7 @@ int foomain(int argc, char **argv) {
 #pragma omp parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp parallel for simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -145,7 +145,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (i = 0; i < argc; ++i)
@@ -180,7 +180,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp parallel for simd lastprivate(ba)
+#pragma omp parallel for simd lastprivate(ba, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
index cf207f021a406b129e8d6c9056825cadb88568a0..5d6da8c9408a380d503f6240377db3e7bbdf387c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
@@ -104,7 +104,7 @@ S3 h;
 template<class I, class C> int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -132,7 +132,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp parallel for simd linear(i)
+  #pragma omp parallel for simd linear(i, z)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp parallel
   {
@@ -168,7 +168,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -182,13 +182,13 @@ int main(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp parallel for simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp parallel for simd linear (argc)
+  #pragma omp parallel for simd linear (argc, z)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k) ++k;
   // expected-error@+2 {{linear variable with incomplete type 'S1'}}
   // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
-  #pragma omp parallel for simd linear (a, b) 
+  #pragma omp parallel for simd linear (a, b)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
index ba54cb2c09ac9e6f9be7d2564890d0f10fb6bc7f..d606f07e5bb406a54caba0c1294a0aeb6b877850 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 77b9b0851e816bbe1244ece6f297e51c15ff86cf..e0e77841319342383c3a8e64c341703aa6789bbf 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index d3565bfa4f195fa2628e5c0a3d7a45a5a83d2470..2dd64d3155f53b5813b287785104be3aa97c7d5e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
 #pragma omp parallel for simd
index 06460c397de3dc524e7f03d2b069b36e632b1bde..f79ec4f68f4bb9f7b9ac4d09e904b90fe9e7874f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for simd num_threads (argc)
+  #pragma omp parallel for simd num_threads (argc + z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
+  #pragma omp parallel for simd num_threads (argc * z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index c5f853fc5de4d9d5303570f273f5e14df3a77919..40ea8ecdc1595a9bb3f39832a11781272f2d26df 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -97,7 +97,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -123,7 +123,7 @@ int foomain(I argc, C **argv) {
 #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for simd private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+#pragma omp parallel for simd private(z, a, b) // expected-error {{private variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for simd private(argv[1]) // expected-error {{expected variable name}}
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0);
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -192,7 +192,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp parallel for simd private(argc)
+#pragma omp parallel for simd private(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
index 26cc729964dc7eb6f8b724597870e57dfcf3ab1d..5e7a22e4172ef8d1e08282b60c84c8b25e28691a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo();
 
index 5586a8b86409aa62dc43ec3ef815035a7e0e9940..4c2e5978b28dc463637d1a27ddb0e3cca36da295 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -131,7 +131,7 @@ T tmain(T argc) {
 #pragma omp parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -247,7 +247,7 @@ int main(int argc, char **argv) {
 #pragma omp parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp parallel for simd reduction(&& : argc)
+#pragma omp parallel for simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 939a1dafb3d28310103e59448f9fd6b16cd4ae42..b0951de6623d5888a146b85a3c565c0943869003 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 29e46a7a0c7946e62d6f2f37ecfcd125ec44e032..5a1e9b9139c8ba0c7efa254f9a39bd3d1d09315c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T k;
   #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -46,7 +47,7 @@ T tmain(T argc, S **argv) {
   // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   #pragma omp parallel for simd schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp parallel for simd schedule (dynamic, 1)
+  #pragma omp parallel for simd schedule (dynamic, k)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
   for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int k;
   #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -68,7 +70,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp parallel for simd schedule (runtime, 3)  // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp parallel for simd schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
+  #pragma omp parallel for simd schedule (guided, k // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
index 8cf196bf719b2284dc1bd3a80817095c4d72f54d..29a340e52f2db16243a70db9c089300be63deff9 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index d0a4c6d1108df89962b63959c2764bd109ad726d..7f802a9e4236ab3a23baecea3d39365ee3d21c28 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel if // expected-error {{expected '(' after 'if'}}
   #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel if () // expected-error {{expected expression}}
   #pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
-  #pragma omp parallel if (argc > 0 ? argv[1] : argv[2])
+  #pragma omp parallel if (argc > 0 ? argv[1] : argv[2] + z)
   #pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}}
   #pragma omp parallel if (S) // expected-error {{'S' does not refer to a value}}
   #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -37,6 +38,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp parallel if // expected-error {{expected '(' after 'if'}}
   #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel if () // expected-error {{expected expression}}
@@ -52,7 +54,7 @@ int main(int argc, char **argv) {
   #pragma omp parallel if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel if(parallel : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp parallel if(parallel : argc)
+  #pragma omp parallel if(parallel : argc>> z)
   #pragma omp parallel if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel'}}
   #pragma omp parallel if(parallel : argc) if (parallel:argc)  // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}}
   #pragma omp parallel if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
index c32e8c895a033901d61ac596a6fac28bf6bb4b03..6012487562e3f6759ba1be26f5f8f29a19c3072c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 310e7ccfa4e8d511eb2bb11b65c39dbe5ca4ab57..0e50c7e1eb2a7dc67600bc320daa5c975921b50e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
   #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel num_threads () // expected-error {{expected expression}}
@@ -24,7 +25,7 @@ T tmain(T argc, S **argv) {
   #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   #pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}}
   #pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
-  #pragma omp parallel num_threads (argc)
+  #pragma omp parallel num_threads (argc+z)
   #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   #pragma omp parallel redef_num_threads (argc, argc)
   foo();
@@ -33,11 +34,12 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
   #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp parallel num_threads () // expected-error {{expected expression}}
   #pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+  #pragma omp parallel num_threads (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
   #pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   #pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}}
index e21049374182fcf98167b071aeeabf23e982a093..08b4175a1eee1048c06ef0a70a2840a3b16001cb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -57,7 +57,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 }; // expected-note {{'da' defined here}}
   S4 e(4);
   S5 g[] = {5, 6};
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp parallel private // expected-error {{expected '(' after 'private'}}
   #pragma omp parallel private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -79,7 +79,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}
   foo();
-  #pragma omp parallel private(i)
+  #pragma omp parallel private(i, z)
   #pragma omp parallel private(j)
   foo();
   #pragma omp parallel firstprivate(i)
index 91be0f1a8d83bf2116fd00aab92ab04fe37c9e82..5639bd184e0856195e214c1031f11182b7848131 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 2e90b63e0db05b2e15e0dcd3c24df432cf33278e..cb0ba7cf712e59a1622c1f869eb5a5704f1af620 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -85,7 +85,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -117,7 +117,7 @@ T tmain(T argc) {
   foo();
 #pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   foo();
-#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   foo();
 #pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   foo();
@@ -180,7 +180,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp parallel reduction(~ : argc) // expected-error {{expected unqualified-id}}
   foo();
-#pragma omp parallel reduction(&& : argc)
+#pragma omp parallel reduction(&& : argc, z)
   foo();
 #pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
   foo();
index da0ef5cb1e0417af5e1d01db36c76e53c899325e..725e6ee932eeee709fbbe80df4f0b15c3ed8dc60 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index 3d2e74933f12c651938530998e399cabc86bda03..d6a10fe56b34418f3a931a7043a34d5ca24463c4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index c161e6f747bc44d7243ed17e285406569cb665f4..f07a7206958a6861dd1fcf4926ffca964884c009 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   {
@@ -101,7 +101,7 @@ int foomain(int argc, char **argv) {
   {
     foo();
   }
-#pragma omp parallel sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp parallel sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   {
     foo();
   }
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   {
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
   {
     foo();
   }
-#pragma omp parallel sections firstprivate(argc)
+#pragma omp parallel sections firstprivate(argc, z)
   {
     foo();
   }
index b03ed3551653d333f6322612fcd8008e989aaad8..8d36b6d5d3086d879d285383138d29b8df4e7ffe 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
   {
     foo();
@@ -53,7 +54,7 @@ int tmain(T argc, S **argv) {
   {
     foo();
   }
-  #pragma omp parallel sections if(argc)
+  #pragma omp parallel sections if(argc + z)
   {
     foo();
   }
@@ -86,6 +87,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
   {
     foo();
@@ -106,7 +108,7 @@ int main(int argc, char **argv) {
   {
     foo();
   }
-  #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2])
+  #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2] + z)
   {
     foo();
   }
index b259b8a19e5f34d7735988c96c59e5573a2523ac..5f3a2e7244b4da33f7630450edfecd4f67c10f95 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 81f0c517cde0a196dd3f45cb47fb2aea10414ad2..ab4c34a6b2c3566feacc810234fe2c8a3d226449 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 780837a15f9c714eb2c437f25563acb7c3df13be..0264cd6dd649efadfdf20d50222876455653e755 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 void foo();
 
index 42bdee25e464a09df1b42dcc1ad52029701d9864..31434e4757ab27db15d7b73e08d8ab741f9839d4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
   {foo();}
   #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -31,7 +32,7 @@ T tmain(T argc, S **argv) {
   {foo();}
   #pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   {foo();}
-  #pragma omp parallel sections num_threads (argc)
+  #pragma omp parallel sections num_threads (argc + z)
   {foo();}
   #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   {foo();}
@@ -40,6 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
   {foo();}
   #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -48,7 +50,7 @@ int main(int argc, char **argv) {
   {foo();}
   #pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   {foo();}
-  #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+  #pragma omp parallel sections num_threads (argc / z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
   {foo();}
   #pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   {foo();}
index 2161df33d8d52fc050fe47d0aef8728571b68087..7e9a6e41b73839173fe8a0ec2b3c93614f15371b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -109,7 +109,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
   {
@@ -151,7 +151,7 @@ int foomain(I argc, C **argv) {
   {
     foo();
   }
-#pragma omp parallel sections private(e, g)
+#pragma omp parallel sections private(e, g, z)
   {
     foo();
   }
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0);
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
   {
@@ -225,7 +225,7 @@ int main(int argc, char **argv) {
   {
     foo();
   }
-#pragma omp parallel sections private(argc)
+#pragma omp parallel sections private(argc, z)
   {
     foo();
   }
index bb173b61e52725f32e1f4472ec4bd2bff658ba3c..81e9c75e8991c55f253f0d4a63326233977b2c63 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index ac205cd076f053bd4c0b3d8f7d3a4c9e51b4006a..72aa9d4dde9eb0cf898d5ccb6a8591d155e84b57 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -87,7 +87,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                             // expected-note 4 {{'j' defined here}}
   S3 &p = k;                            // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];              // expected-note 2 {{'r' defined here}}
@@ -145,7 +145,7 @@ T tmain(T argc) {
   {
     foo();
   }
-#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp parallel sections reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   {
     foo();
   }
@@ -240,7 +240,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                           // expected-note 2 {{'j' defined here}}
   S3 &p = k;                            // expected-note 2 {{'p' defined here}}
   const int &r = da[i];                 // expected-note {{'r' defined here}}
@@ -342,7 +342,7 @@ int main(int argc, char **argv) {
   {
     foo();
   }
-#pragma omp parallel sections reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp parallel sections reduction(+ : o, z) // expected-error {{no viable overloaded '='}}
   {
     foo();
   }
index 1ab923c3308c63e2b2cc6fba9d4cb3e0ef710ced..554c6e2286c6de22a28bc2d5fab074ce59c7de8c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel sections shared // expected-error {{expected '(' after 'shared'}}
   { foo(); }
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
   { foo(); }
 #pragma omp parallel sections shared(S1) // expected-error {{'S1' does not refer to a value}}
   { foo(); }
-#pragma omp parallel sections shared(a, b, c, d, f)
+#pragma omp parallel sections shared(a, b, c, d, f, k)
   { foo(); }
 #pragma omp parallel sections shared(argv[1]) // expected-error {{expected variable name}}
   { foo(); }
index 915b6a2cfc6265651f5d03943ab01086b1c51064..0869f169133fe4de7b89625c616ba23e103cfbb4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, k;
   int &j = i;
   #pragma omp parallel shared // expected-error {{expected '(' after 'shared'}}
   #pragma omp parallel shared ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -69,7 +69,7 @@ int main(int argc, char **argv) {
   #pragma omp parallel shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   #pragma omp parallel shared (argc)
   #pragma omp parallel shared (S1) // expected-error {{'S1' does not refer to a value}}
-  #pragma omp parallel shared (a, b, c, d, f)
+  #pragma omp parallel shared (a, b, c, d, f, k)
   #pragma omp parallel shared (argv[1]) // expected-error {{expected variable name}}
   #pragma omp parallel shared(ba)
   #pragma omp parallel shared(ca)
index edc98f1a14e6b0d1efca8d90b86e5a9d5aebd3ba..72a6c5022975e89e589adf3a0da62491457f2e9f 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100  %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100  %s -Wuninitialized
 
 int a;
 #pragma omp requires unified_address allocate(a) // expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note{{unified_address clause previously used here}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp requires'}}
index e2d9de3c3166a8677049a3a4f615deb866db0f4e..1b595f483c422dc7f850f2dce2e87aafb725cdc6 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   {
     foo();
   }
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -221,7 +221,7 @@ int main(int argc, char **argv) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections firstprivate(argc)
+#pragma omp sections firstprivate(argc, z)
   {
     foo();
   }
index f7e0d1acf0e91dd0cdd9a669e2028e29bf8f433c..37a0100bf65e3dcd6b4c2adc353e8a94131d0124 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -68,7 +68,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel
 #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -111,7 +111,7 @@ int foomain(int argc, char **argv) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp sections lastprivate(a, b, k) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   {
     foo();
   }
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp parallel
 #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections lastprivate(ba)
+#pragma omp sections lastprivate(ba, k)
   {
     foo();
   }
index ba030859e575683ee8b73d16fbfbd1ee8608ef2c..8d8dab86a3c394593d8c47f237df7b8d1b94a916 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 void foo();
 
index 3548590b0f4fc6983e1f676b49ffcd2788080e72..e032c7a5eceaa911770619d5605cf6a1eb1ff2ed 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index e0b285cbaf4c2a201f78012d4fefd2af1a1c7b21..8b1c1f1abbc4d6c6c861adeeb809642f26bbbae4 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -88,7 +88,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                // expected-note 4 {{'j' defined here}}
   S3 &p = k;               // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
@@ -210,7 +210,7 @@ T tmain(T argc) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp sections reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}}
   {
     foo();
   }
@@ -268,7 +268,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;           // expected-note 2 {{'j' defined here}}
   S3 &p = k;            // expected-note 2 {{'p' defined here}}
   const int &r = da[i]; // expected-note {{'r' defined here}}
@@ -330,7 +330,7 @@ int main(int argc, char **argv) {
     foo();
   }
 #pragma omp parallel
-#pragma omp sections reduction(&& : argc)
+#pragma omp sections reduction(&& : argc, z)
   {
     foo();
   }
index 7621d7de096b2199e9df7fcaf9ffd784d261d712..44679b3373ae2a97f54e0d1e91c00fc887c2f13a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 3e980d949279b65a9406e06570f601e65a1e63f6..978ae29fcad6d15c86e832c81b0326467df2f939 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 9469c53b74666332e643a15b358e22443c5c9e53..e9171af2eb7ec0f57fc46914a398999bc4470946 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index fa2690616cd7d2de80ac1a7cf6d0ef566f4a4a27..964439277b6513656a388948c3226e3470abd178 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
@@ -104,7 +104,7 @@ S3 h;
 template<class I, class C> int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -140,7 +140,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+  #pragma omp simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -195,7 +195,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   // expected-error@+2 {{linear variable with incomplete type 'S1'}}
   // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
-  #pragma omp simd linear(a, b)
+  #pragma omp simd linear(a, b, z)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
index 975cd7f90f707e2b6ffd19da2c979c80af4d44a7..7a3bdedac96786f5b6f7b17227ed266638c7c0b4 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized
 
 static int sii;
 // expected-note@+1 {{defined as threadprivate or thread local}}
index 75b8ce0596c7cfa41c54d0f710cf99c71608650c..1fbb6fa263cc5838b86a7ff16525421409e13eb0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}}
 #pragma omp simd
index 99f76ceed54a52f7a97f44fd5a0111413783d7c7..12927b07d1999a33aa310d11a278637b17a1f3d8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index f204ae16084e03bb3955121ba85166ab749d9b11..8e2503331b6ead3f9c67c4122b3deb8ce610f3fb 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -131,7 +131,7 @@ T tmain(T argc) {
 #pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -211,7 +211,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -250,7 +250,7 @@ int main(int argc, char **argv) {
 #pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp simd reduction(&& : argc)
+#pragma omp simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index f40873aeeae9370da8f6589373310161332acaf9..7a557781a758477a6f1521160271c3feec08ad8d 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 27ab4acf770bff8809291736c6c4fc0b3c683e73..0b7b800c26a79abcbf53bc9dbdecb7f1a832bf80 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index bb18568d0f289c0bde77ec8185da0468d9a5ef22..1dc508b01bd74b06fdd3e7ce1d8164cf0c072b35 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -45,8 +45,10 @@ S5 m(4);
 
 template <class T, class C>
 T tmain(T argc, C **argv) {
-  T i;
+  T i, z;
   static T TA;
+#pragma omp single copyprivate(z)
+  ;
 #pragma omp parallel
 #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
 #pragma omp parallel
@@ -121,7 +123,7 @@ using A::x;
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   static int intA;
 #pragma omp parallel
 #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
@@ -146,9 +148,9 @@ int main(int argc, char **argv) {
 #pragma omp parallel
 #pragma omp single copyprivate(m) // expected-error {{'operator=' is a private member of 'S5'}}
   foo();
-#pragma omp parallel private(i)
+#pragma omp parallel private(i, z)
   {
-#pragma omp single copyprivate(i)
+#pragma omp single copyprivate(i, z)
     foo();
   }
 #pragma omp parallel shared(i) // expected-note {{defined as shared}}
index cff4b9013bf7b018d02ace40fdb64ada1cc3be0f..d97be2ab9be06c96819ed5861847abae7c2d2b45 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -67,7 +67,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -94,7 +94,7 @@ int foomain(int argc, char **argv) {
 #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   foo();
 #pragma omp parallel
-#pragma omp single firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp single firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   foo();
 #pragma omp parallel
 #pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -150,7 +150,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -171,7 +171,7 @@ int main(int argc, char **argv) {
 #pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   foo();
 #pragma omp parallel
-#pragma omp single firstprivate(argc)
+#pragma omp single firstprivate(argc, z)
   foo();
 #pragma omp parallel
 #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
index b8264198079eecd03a92f613dd563f62dadcd0fe..0d4ab5a77b5a3c1f1152652be004b90d6658293e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 void foo();
 
index 6ae2a385a38d6a1de04b3be8e3a9e69de7e0ccf7..e809f0732a1b32da73a06937c0ad7d543265be3e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 51c809a8653e1fbc61a2a315837095623788df1c..873402d372ddf58ccd5281d7880d32e5925b6001 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,14 +12,14 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int a;
+  int a, z;
   #pragma omp target data map(to: a) device // expected-error {{expected '(' after 'device'}}
   #pragma omp target data map(to: a) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target data map(to: a) device () // expected-error {{expected expression}}
   #pragma omp target data map(to: a) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target data map(to: a) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
 #pragma omp target data map(to: a) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-  #pragma omp target data map(to: a) device (argc + argc)
+  #pragma omp target data map(to: a) device (argc + argc + z)
   #pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}}
   #pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
index ae68d252a8e1fe1a3ca00f20fe8d7bd23318346a..c6f9b4b34eeeaf1729f4b11eec14cd5704d4bfe8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,14 +12,14 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int a;
+  int a, z;
   #pragma omp target data map(to: a) if // expected-error {{expected '(' after 'if'}}
   #pragma omp target data map(to: a) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target data map(to: a) if () // expected-error {{expected expression}}
   #pragma omp target data map(to: a) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target data map(to: a) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}}
   #pragma omp target data map(to: a) if (argc > 0 ? argv[1] : argv[2])
-  #pragma omp target data map(to: a) if (argc + argc)
+  #pragma omp target data map(to: a) if (argc + argc + z)
   #pragma omp target data map(to: a) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'if' clause}}
   #pragma omp target data map(to: a) if (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp target data map(to: a) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
index 936e3eaa64cbb26559c316f64074caf7c634f188..9497ddba026de836d8b9c0ef97de71eee0db5727 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() { }
 
index 87f23e2de77b0d218f959fa0abc95518a5832a7f..6ce6f9db7d224252481fc50a1a138c092abfc63b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
 struct ST {
   int *a;
 };
index 27079c30281106affcf050ec4a8335949c80f652..0676753d6a601e2afc827a22f1b6e6ff9d45e53b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index d6990805450b3b514a68146b791fc1b8d8f5ad76..a7ac1760e6b50ddab06dbea04f9ad2795da0a2a3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 8cf19b25970d4d765cf665b00dc0aaa10724e348..8a583e9f3bd74f34df9b9b95f67f1ba244b17aca 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,6 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target device // expected-error {{expected '(' after 'device'}}
   foo();
   #pragma omp target device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -20,7 +21,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-  #pragma omp target device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}
+  #pragma omp target device (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}}
   foo();
   #pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
index c9a0d7ab3c55cc33343944ffee2f9bf02c950d9c..49dddfcc7cbab4e1efaf7be67342bff86fc8d228 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index de8405b4a62fcf413765ef781c96ca725f9c8eb8..a233a47152dc0d5e3c437eaf6e4e47fd065753ee 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,14 +12,14 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target enter data map(to: i) device // expected-error {{expected '(' after 'device'}}
   #pragma omp target enter data map(to: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target enter data map(to: i) device () // expected-error {{expected expression}}
   #pragma omp target enter data map(to: i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target enter data map(to: i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target enter data' are ignored}}
 #pragma omp target enter data map(to: i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-  #pragma omp target enter data map(to: i) device (argc + argc)
+  #pragma omp target enter data map(to: i) device (argc +z +  argc )
   #pragma omp target enter data map(to: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'device' clause}}
   #pragma omp target enter data map(to: i) device (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp target enter data map(to: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
index 26404a5d97a7731d6ea40fb0f3cb191c852acde6..5123d607dc6a18ac0291efe97488e2359e049c2c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target enter data map(to: i) if // expected-error {{expected '(' after 'if'}}
   #pragma omp target enter data map(to: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target enter data map(to: i) if () // expected-error {{expected expression}}
@@ -27,7 +27,7 @@ int main(int argc, char **argv) {
   #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target enter data map(to: i) if(target enter data : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp target enter data map(to: i) if(target enter data : argc)
+  #pragma omp target enter data map(to: i) if(target enter data : argc + z)
   #pragma omp target enter data map(to: i) if(target enter data : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target enter data'}}
   #pragma omp target enter data map(to: i) if(target enter data : argc) if (target enter data:argc) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'if' clause with 'target enter data' name modifier}}
   #pragma omp target enter data map(to: i) if(target enter data : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
index 7d03fcfa9a3c391f33e9abfff95c598583490ce5..cd082c63f85fac6fb68b474a6ecd223a6d6f3013 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized
 
 int main(int argc, char **argv) {
 
index 6f59c5ceb7b7ba0a5f7fb7088cf35df446eadada..3f5dde00b814ca415c7d647ed4167e013c4ed619 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 int main(int argc, char **argv) {
   int i;
index 07ff02fad48dfa18ddd411362a9fd8ed55899c67..8a2b07e55c5b408b589bd93ff6bf05ec3367f21d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index ad27e8a50dd8c4f093bc6b750a7c5ac63d14b130..035bf6f76a615ba09b382e5106c4dea1eca5277b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target exit data map(from: i) device // expected-error {{expected '(' after 'device'}}
   #pragma omp target exit data map(from: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target exit data map(from: i) device () // expected-error {{expected expression}}
@@ -23,7 +23,7 @@ int main(int argc, char **argv) {
   #pragma omp target exit data map(from: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'device' clause}}
   #pragma omp target exit data map(from: i) device (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp target exit data map(from: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
-  #pragma omp target exit data map(from: i) device (-10u)
+  #pragma omp target exit data map(from: i) device (-10u + z)
   #pragma omp target exit data map(from: i) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}}
   foo();
 
index 9341fe81794b874837c199d8350721877d2572e1..c45b32ff3fe7579966280c61ae5fbc08ab100d07 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,14 +12,14 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target exit data map(from: i) if // expected-error {{expected '(' after 'if'}}
   #pragma omp target exit data map(from: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target exit data map(from: i) if () // expected-error {{expected expression}}
   #pragma omp target exit data map(from: i) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp target exit data map(from: i) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}}
   #pragma omp target exit data map(from: i) if (argc > 0 ? argv[1] : argv[2])
-  #pragma omp target exit data map(from: i) if (argc + argc)
+  #pragma omp target exit data map(from: i) if (argc + argc + z)
   #pragma omp target exit data map(from: i) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'if' clause}}
   #pragma omp target exit data map(from: i) if (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp target exit data map(from: i) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
index 4a2df448d3e0648453a5343aac4a3b32153fd5ec..f90c0d4ad6601c3b678810c2644dbc5daa6ef359 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized
 
 int main(int argc, char **argv) {
 
index 02eded5a66df7e268f9725d94f7147191ecfe6cc..307e2c34b27fb1eba5f43314f789e4a928def914 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 int main(int argc, char **argv) {
   int i;
index 248751f789852e5285db1a73db9e2bcc79590e92..d96516aebe713a573f166ac560229c10761f7878 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -99,7 +99,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}}
 {}
@@ -131,8 +131,8 @@ int foomain(I argc, C **argv) {
     int v = 0;
     int i;
   }
-#pragma omp parallel shared(i)
-#pragma omp parallel firstprivate(i)
+#pragma omp parallel shared(i, z)
+#pragma omp parallel firstprivate(i, z)
 #pragma omp target firstprivate(j)
 {}
 #pragma omp target firstprivate(i)
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0);
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}}
 {}
@@ -173,7 +173,7 @@ int main(int argc, char **argv) {
 {}
 #pragma omp target firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
 {}
-#pragma omp target firstprivate(argc)
+#pragma omp target firstprivate(argc, z)
 {}
 #pragma omp target firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
 {}
index 982fd4b0c028f429f9176c431c3d03f626fa2c98..e6b667f2cffbf348e66803b1ad35f3232c6157b2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp target if // expected-error {{expected '(' after 'if'}}
   foo();
   #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -33,7 +34,7 @@ int tmain(T argc, S **argv) {
   foo();
   #pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-  #pragma omp target if(argc)
+  #pragma omp target if(argc+z)
   foo();
   #pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
@@ -52,6 +53,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp target if // expected-error {{expected '(' after 'if'}}
   foo();
   #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -80,7 +82,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-  #pragma omp target if(target : argc)
+  #pragma omp target if(target : argc/z)
   foo();
   #pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}}
   foo();
index 6f218e20f98cb719c0776fc85c54c900de761228..92297438d5250fc86be1be1332f51fdf9a0de3d4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
 struct ST {
   int *a;
 };
@@ -40,7 +40,7 @@ struct SA {
 #pragma omp target is_device_ptr(aa) // OK
     {}
 #pragma omp target is_device_ptr(raa) // OK
-    {}    
+    {}
 #pragma omp target is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}}
     {}
 #pragma omp target is_device_ptr(g) // OK
index 04e201d13623ab3cd7bfd3a477147f07a48c9575..15f7b4fe072e4307aad5ceb44f6dfb811d48bc3a 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
 #ifdef CCODE
 void foo(int arg) {
   const int n = 0;
index 1f982dd67403133387218af8bf22298455f79465..6b8a1f4d0ac472bae2ad48d5ada2bab41729e7f1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index 0aab663b0b9e2d5d600b49a13130402065745566..0691cdf37e4ebe94b3232624cac6ac30f9220408 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 33078a2ea7e8fbdec6f90000df959ebe0f7565b9..71a4d8a0ea554c43e4aba5f11f8ef1569708189a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 15e22134b3e46150c707f944e5522ac92fd08bdc..61557bd2aafd8ee1e65c0339a19aa53d44d6bf60 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index cc2525375316e5514b111f2289e46aea395a0587..9d5e4ed5567e4180f5365305c8d8b11a9531d886 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,6 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
+  int k;
   #pragma omp target parallel device // expected-error {{expected '(' after 'device'}}
   foo();
   #pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -26,7 +27,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target parallel device (argc + argc)
   foo();
-  #pragma omp target parallel device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}
+  #pragma omp target parallel device (k), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}}
   foo();
   #pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}}
   foo();
index d6c1bb24961190392590b346e0fd5283341274e1..075beaeac82f34f8a102e2ad05dc19cb7cad1f3e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -72,7 +72,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   static int m;
   #pragma omp target parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -97,7 +97,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target parallel firstprivate(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel' directive}}
   foo();
-  #pragma omp target parallel firstprivate(ca)
+  #pragma omp target parallel firstprivate(ca, z)
   foo();
   #pragma omp target parallel firstprivate(da)
   foo();
index 2e194ffbd0807d2bae5e9dbc765950d0dba0c15d..98700b87e5eb13158ca5289b5f9418dfe851f31e 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 87f6a5bde16e14c31792695c7acf5a74082e5197..fc6ba43138d76fc5d0123f853399a205d958a15d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 9f97b60ff41cf3ebf684c164336a50da97cd8d74..bdcc7684e4f698624f3a224df4fc97d3e0444027 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 4b255ab0f3af54aba534e2bf73a169547a3ec99e..f6206912fe1ae1cea0f3a4eb4722c8b6e6752930 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index bacf57d99cccb503aed007dc491313c820ad9653..2882c8fc564ba1be21ecf64832dd02899f32b7e8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target parallel for device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for device (argc + argc)
+  #pragma omp target parallel for device (z + argc)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index 286faec963099a7906889cdc468a3950570cf289..dd05d84cb4ff105eee84646864ebf3ede421b614 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp target parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
index 2bc433cf421dbc35b5351e3dddc53564bdc16cb6..445dc1775b0f2963c8f2208a1200269886928db4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}}
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
   int i;
+  T z;
   #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +35,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for if(argc)
+  #pragma omp target parallel for if(argc + z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -61,7 +62,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +73,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2])
+  #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2] - z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'if' clause}}
   for (i = 0; i < argc; ++i) foo();
index 3e675ead2acc683064aa935f26b7cd9ca166f6da..db3aa32edfbff0a37aad56f12aced009343d3085 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct ST {
   int *a;
index d01e393baedef7997705817b82469678fb4446d4..906b5923e364b25100d3767d56ebf4b9994293a3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 3556faa3cab647abd4b1be8ea0233b25e0ab2ec0..f5af0ed3c8185e73df0848b4f1bc6bb23c123649 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -166,7 +166,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target parallel for allocate(omp_thread_mem_alloc: e) linear(e, g) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+#pragma omp target parallel for linear(z, h) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for linear(i)
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for linear(argc)
+#pragma omp target parallel for linear(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for linear(S1) // expected-error {{'S1' does not refer to a value}}
index 6cc1f80887d6e32cc2490c273961480a75ffbae7..e81d3b2deeb43c591ee816f616cbb201f7db5b4e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index 6ef87d442fe3ee2753ab02a9052f3ab94d5e49b5..0f02350e29fa631a84cdce2bc3c58fd4575f35cc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index c454987e255fda5ba6476d787a40f185e5d7c531..e78154a5b3dae06ce8bc8967fca1727754de207c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 44629e10c0c0d0d4abed7d302f8179cccbd27117..f697cf2e6ca484eee5349b3d0da776f5b7c07d9d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}}
 #pragma omp target parallel for
index 2fb875b9de9f59ba02863cd3da22f78ca8294276..2f88c6581d4f21f5a0eb11a088c025f6a18200a4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index b47c96b82b55b7491604dce3350c7fdd183f2773..11f0c9078047160814e47f36678671221f6dfd0d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
+  #pragma omp target parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
+  #pragma omp target parallel for num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index 38a977e293503f75a2140874b1b0f6cf084d1046..b703f251f4e0cce1b04d8759e97c7094b2e56b1a 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 2e3848a60002510511abaac0223d26aa649f86d0..4635896a5375cb9b2485771ec117acb5aa00c494 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -132,7 +132,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+#pragma omp target parallel for private(a, b, z) // expected-error {{private variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for private(argv[1]) // expected-error {{expected variable name}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0);
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i ,z;
   int &j = i;
 #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for private(argc)
+#pragma omp target parallel for private(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
index 60d5b74fdc008aa5c65d6e0a9cdabfd3aa155878..1adb0b50c2e4f2e46fafc94c6ac3865d20a0079b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 3b201f2f2ee6fde07b73967929169e97a457828e..3666a34c952132931eab1ce550b5b01f51211bec 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
 #pragma omp target parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target parallel for reduction(&& : argc)
+#pragma omp target parallel for reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 544ace25e408c0638a2de093166600c62e058346..287585dfec8cb22d6eb46558b09e0b78fe88ffdc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -46,7 +47,7 @@ T tmain(T argc, S **argv) {
   // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   #pragma omp target parallel for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp target parallel for schedule (dynamic, 1)
+  #pragma omp target parallel for schedule (dynamic, 1 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}}
   for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+  #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 + z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 54a6a9e8de26a75213b986b6fd239513ccd9b2ed..b73abba48e221be97350cef6cab88edfffa720d5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 24e30b3d3f22cf8666dfb00353a07e2bcf0f55e1..df1b27d2834378cc06442379f12ae86ff08e65b8 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 91e745d911cb8edc6923d8440fc5af01e7fa8233..daa93b9c9050b28ea8c4d339f0f3930259acd590 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index c019c37c39d3815e2a1fb7084fbb6cd206960e58..1affed137a1388ed9c3bbdbc6df0f686dd92c4bb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 6410a6c35a0a348a00b5d14cb3fd79f5c05d953a..01e00bf15f3f1982ea4986894891eef8335584cc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 8d2719571aba1f27830ddc4ea2264efa640d5a50..a592cac8d5de971f6fddc12d5caa3a1b9cbb5148 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target parallel for simd device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for simd device (argc + argc)
+  #pragma omp target parallel for simd device (argc + argc + z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index 77661a3133604948e42da544dba3a26384263764..d76fedcce836c2c0a5039b201f96776fb18f2cf9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i,z;
   int &j = i;
 #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp target parallel for simd firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}}
index fea1ad9778f5463bc790eb74fccd4f90532fccbb..b0da8017019f0e1ea9511d517439779094a86d7b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  int i;
+  int i, k;
   #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for simd if(argc)
+  #pragma omp target parallel for simd if(k)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -61,7 +61,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, k;
   #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -90,7 +90,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for simd if(parallel : argc)
+  #pragma omp target parallel for simd if(parallel : k)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel for simd'}}
   for (i = 0; i < argc; ++i) foo();
index 1079bf3cbb8472107a63d2be84e8101453a97c19..47e498a44c6db224fc2b43ee7c3d84dbac57a69f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 struct ST {
   int *a;
 };
index 750fa3b19a77fc2f209a4393ea0caaea4f7d384f..04f52f540d4cb7f7f3d6061f65fd95f5caf89f83 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp target parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (i = 0; i < argc; ++i)
@@ -187,7 +187,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp target parallel for simd lastprivate(ba)
+#pragma omp target parallel for simd lastprivate(ba, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
index b5664dd3179c02decc746b88295ad56780228365..829e9eb56695402f996e22e6540a6f8b8a7aa57e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -163,7 +163,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target parallel for simd linear(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd linear(e, g)
+#pragma omp target parallel for simd linear(e, g, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd linear(argc)
+#pragma omp target parallel for simd linear(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd linear(S1) // expected-error {{'S1' does not refer to a value}}
index e2e80186cd8894c535c86611e6a2087b9e32b3c6..9bcef91a25713ee258caf556bc8147e735403b4c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index f18cc9a5f8102df5178d22399ac7de5025fad576..6f7dc528d8481cfb1cdebc40a247dc6de640dadd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -61,7 +61,7 @@ T tmain(T argc) {
   T &j = i;
   T *k = &j;
   T x;
-  T y;
+  T y ,z;
   T to, tofrom, always;
   const T (&l)[5] = da;
 
@@ -102,7 +102,7 @@ T tmain(T argc) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target parallel for simd map(S2::S2sc)
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target parallel for simd map(x)
+#pragma omp target parallel for simd map(x, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target parallel for simd map(to: x)
   for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
   int &j = i;
   int *k = &j;
   int x;
-  int y;
+  int y, z;
   int to, tofrom, always;
   const int (&l)[5] = da;
 
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target parallel for simd map(to: to)
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target parallel for simd map(to)
+#pragma omp target parallel for simd map(to, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target parallel for simd map(to, x)
   for (i = 0; i < argc; ++i) foo();
index 76090e855371baa32109a1eca971c2a4cb751117..5d07c895b9eb5b87e86239c874f2871aed5bf1fc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 8886ddd4a1e0bb540803aa7ebdc152b0e2ca561b..1459d8322a773806d2b127fd7c002e6863f9c567 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}}
 #pragma omp target parallel for simd
index 5e1e13168d5b4b3d5a66e2c616a60685d0f9ec5f..4220bfea3ee3f72033926f1f07dc71d1d331339d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index b3323f67728fbb6fcfb299b8daedd7f766659942..f7979057ae2b4058552f17e2387b9e6ff85befb8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
   #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
+  #pragma omp target parallel for simd num_threads (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
+  #pragma omp target parallel for simd num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index 08b9247c1bba151b515e9bf4ffd8e1fc96ac5821..235cbe464f691c90ed4d6d1a973ff1913a77f217 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 6210323330d6b5c58b5771b234a4c88059ebea62..4e0859db32564efe7823ca8c0bac1b7a958779bd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target parallel for simd private(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd private(e, g)
+#pragma omp target parallel for simd private(e, g, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target parallel for simd private(argc)
+#pragma omp target parallel for simd private(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}}
index 83b4efad15bd091181f5d2204538628266fac41b..ba16e06ea1b60a670dc6f6cd57cef3301dc263b8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 87be4f1c65e3d939c123dab03fb00205ed451e92..126518a58d82e6bb4ee862f0d32268dcaec02fde 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
 #pragma omp target parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
 #pragma omp target parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target parallel for simd reduction(&& : argc)
+#pragma omp target parallel for simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 1121593e5e676d94f254c9b143070879ed9bd46e..87aaa83a781179f23422e0fef0b0157ebf6130dc 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 6f26e7aac4336c9db066bb8f914124729f3691bb..5d118b7c9ac37fed3f700622b08ec60316350251 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -35,7 +36,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   #pragma omp target parallel for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-  #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
+  #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
@@ -54,6 +55,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,7 +74,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   #pragma omp target parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-  #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+  #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
   // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}}
   // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 33a6642a8dc779ab36c30934bf0137b733ec936e..17a931c9f120becedb5ca8cef1ce2cfd1ec91768 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index d59b4ab5074b20e4cdeb290a43843fb38d6b1779..460e0c8655f096061dd308ac4e527a7415e66b15 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp target parallel if // expected-error {{expected '(' after 'if'}}
   foo();
   #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -23,7 +24,7 @@ int tmain(T argc, S **argv) {
   foo();
   #pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
   foo();
-  #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2])
+  #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2] + z)
   foo();
   #pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}}
   foo();
@@ -60,6 +61,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target parallel if // expected-error {{expected '(' after 'if'}}
   foo();
   #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -88,7 +90,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-  #pragma omp target parallel if(parallel : argc)
+  #pragma omp target parallel if(parallel : argc * z)
   foo();
   #pragma omp target parallel if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}}
   foo();
index b46fd713ff6385515a8fa18cc7028fd1f48bf5af..9913133734a742542a9b5285bce29802ba15dcec 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
 struct ST {
   int *a;
 };
index 52774aa7410de1cd420b57de20a3720fe82d552d..a7a4e1cd9c2019654d7f0a90ea8c6b8db022aa95 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -61,7 +61,7 @@ T tmain(T argc) {
   T &j = i;
   T *k = &j;
   T x;
-  T y;
+  T y, z;
   T to, tofrom, always;
   const T (&l)[5] = da;
 
@@ -88,7 +88,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target parallel map(l[true:true])
   foo();
-#pragma omp target parallel map(x)
+#pragma omp target parallel map(x, z)
   foo();
 #pragma omp target parallel map(tofrom: t[:I])
   foo();
index a7dfbf91ca53699cf10795b50ca9d5bb8f7e3c6e..f664ec121094cc0941578f830808cafb174a2b10 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 // RUN: not %clang_cc1 -fopenmp -std=c++11 -fopenmp-targets=aaa-bbb-ccc-ddd -o - %s 2>&1 | FileCheck %s
 
 // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
index 8da03e4756ab4361f35bb870aaad8c75640d1fa7..3e285fca3aee16a1f317f63ec2efbd457cd9ac3f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index efc1d1327f5ab6cfeeec1f2c7825804154e554b9..79f77b7dc9f91bc4638edb5db11cc5fd5c6728f1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
   #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
   foo();
   #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -33,7 +34,7 @@ T tmain(T argc, S **argv) {
   foo();
   #pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
-  #pragma omp target parallel num_threads (argc)
+  #pragma omp target parallel num_threads (argc + z)
   foo();
   #pragma omp target parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   foo();
@@ -44,6 +45,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
   foo();
   #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -52,7 +54,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-  #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
+  #pragma omp target parallel num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}}
   foo();
   #pragma omp target parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   foo();
index 97ed1fc96add14c029427bbbe137aaec3081022e..a23c2ea2f1ab635712ac6d559035a0399e21662a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index a01b63d7fef0c6ab7a4f4c5bc13ddc46c5b7587a..0b8d1821b30542b30be594f35e7f86a19d8ebf15 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index eca57a8cce7f4c62e2d4e143716ec1721dc2e188..929d6af18cd9e0ad79a2bf9bf3677431cab198d7 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   foo();
-#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   foo();
 #pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   foo();
@@ -192,7 +192,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -220,7 +220,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target parallel reduction(~ : argc) // expected-error {{expected unqualified-id}}
   foo();
-#pragma omp target parallel reduction(&& : argc)
+#pragma omp target parallel reduction(&& : argc, z)
   foo();
 #pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
   foo();
index 2ade722dd3a2a73c1c0319f95e4306747cdb086a..f32c9edc2892c605f36c2346b00551e56be9d174 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp target parallel shared // expected-error {{expected '(' after 'shared'}}
   foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
   foo();
   #pragma omp target parallel shared (S1) // expected-error {{'S1' does not refer to a value}}
   foo();
-  #pragma omp target parallel shared (a, b, c, d, f)
+  #pragma omp target parallel shared (a, b, c, d, f, z)
   foo();
   #pragma omp target parallel shared (argv[1]) // expected-error {{expected variable name}}
   foo();
index 245a0ea2b038d7a3c7e4028fa704bb715a4fca9e..d0db6be2393145122968606e05a7a1b6bffdc959 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index b9b744f4555e34cff45540a275ba7007b540bb0b..28c7c95723f535c879f85bd098efe0e14e8244de 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -122,7 +122,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}}
   foo();
-#pragma omp target reduction(&& : argc)
+#pragma omp target reduction(&& : argc, z)
   foo();
 #pragma omp target reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   foo();
@@ -189,7 +189,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -223,7 +223,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
   foo();
-#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+#pragma omp target reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
   foo();
 #pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
   foo();
index d2628b435796aa8a5f3db370bf1e7f9fd9a667d0..3069e702733be21578aeadbdfaaa849fbc71add0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 8bf2c3bbf706c5ab42c42b6b8a469c0e100f227a..89b940221d95e274a3c4bcb7259a1c333b6720b9 100644 (file)
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 33e12c1e0e84bc0ed9c8423c2fd5a456759ef2be..2284643454527ebc262479dd0fbcdecbabb0038e 100644 (file)
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
 
 template <class T, typename S, int N, int ST>
 T tmain(T argc, S **argv) {
-  int i;
+  int i, k;
   #pragma omp target simd defaultmap // expected-error {{expected '(' after 'defaultmap'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
index 69594db71c0fcb918b55f513c454d206ff211813..c02fac5a824c359791c0e4454643fdb2f7d8f727 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index d705f6140285d8bfa56fd01bc9de61bbfb63b236..15bfec132a8e96f0bc0064280f41ec0d52ee7204 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target simd device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target simd device (argc + argc)
+  #pragma omp target simd device (argc + argc * z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index eac95ade6f1d1113924723e24befea83464ad403..c26ef158f87db6195b6cba206204547ca94135ea 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (int k = 0; k < argc; ++k)
@@ -102,7 +102,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp target simd firstprivate(a, b, z) // expected-error {{firstprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target simd firstprivate(argv[1]) // expected-error {{expected variable name}}
@@ -161,7 +161,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   for (i = 0; i < argc; ++i)
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
 #pragma omp target simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i)
     foo();
-#pragma omp target simd firstprivate(argc)
+#pragma omp target simd firstprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
index 60dee37ac543a49a885c5867e7dfc2340065ec0d..94d2ab308daa2363fbf14aa908712a1b0a15125c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   int i;
   #pragma omp target simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
@@ -34,7 +35,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target simd if(argc)
+  #pragma omp target simd if(argc + z)
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -53,7 +54,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
   #pragma omp target simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -82,7 +83,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-  #pragma omp target simd if(target : argc) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}}
+  #pragma omp target simd if(target : argc + z) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}}
   for (i = 0; i < argc; ++i) foo();
   #pragma omp target simd if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'if' clause with 'target' name modifier}}
   for (i = 0; i < argc; ++i) foo();
index 6d6bc247c80689a4afd0e59a9e112a98aca3a970..1d8c90632fd2018034f4b1e4779ba8d153804dcf 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct ST {
   int *a;
index 8b485840cef73d2ba0261627b5ee8d9c74abbe94..6f1ef52d77151c9ebb42ab78a7f94072eca211a6 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 86e3cc43fbfae63ba829b407e167c9b93e6cb913..5a2ef96ecd0603d8a27a13d00117a753a6cc87f2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -129,7 +129,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -169,7 +169,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target simd linear(i)
+#pragma omp target simd linear(i, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -214,7 +214,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k)
@@ -234,7 +234,7 @@ int main(int argc, char **argv) {
 #pragma omp target simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target simd linear(argc)
+#pragma omp target simd linear(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target simd linear(S1) // expected-error {{'S1' does not refer to a value}}
index 4ab02e7550580acdf4f7394809c16b1b698387e7..e634bd585746e4807b3662ab4c823c0c9ad52074 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index 4b76042e456bab951d8dda7191f2ab2f82dc9996..a93d20eb35feeff0e01e1d5310145c0c65d6a869 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index aa259c069663116706bf20e7a851a3dbd04ab836..37f5fae9502bc7c463d348c14c8016fe3d9b8703 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 3965d28af577f1ba5ab19bd3b7d3b7c4c04f4657..83d73fa013a6a617611fc79cf923495c07494488 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target simd'}}
 #pragma omp target simd
index c7ab302cb0f90ea0f2c9291810160cd372ddccb9..1aee110969489958a28aab7af16150f7d28b9f62 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index f95d77c302a93e747a4e1c93bf7812fe16222f0a..e1b9585d4d8c0b961cd38578d50146c704f5f44e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
 #pragma omp target simd private(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target simd private(e, g)
+#pragma omp target simd private(e, g, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -198,7 +198,7 @@ int main(int argc, char **argv) {
 #pragma omp target simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp target simd private(argc)
+#pragma omp target simd private(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp target simd private(S1) // expected-error {{'S1' does not refer to a value}}
index e50159462c7051dfe86b7d42eaf3c8f70ce0c748..551099418d300bd4c6238ccd7b7944e33e822b11 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -95,7 +95,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -140,7 +140,7 @@ T tmain(T argc) {
 #pragma omp target simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -217,7 +217,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -256,7 +256,7 @@ int main(int argc, char **argv) {
 #pragma omp target simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp target simd reduction(&& : argc)
+#pragma omp target simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp target simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 993d707114d6e3468e2b246522ed4d45c1aabc56..5e23ba1a74c16544710622f13d6c44a8411cbebf 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 3a6e477886bf9d9701bb362c807720a179a514fa..848770e86a1e9f62aa589ef0fabe37bc3ad8deec 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index a144fa05f126acc5a73c4292445af83dbcc0c58a..21fa8270ef6a73bd355f6a8fbc7e2f2b0e4a12ee 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo();
 
index b1b2bdd38962059d78f296587dd129f794780774..36966bca8f46778bf8a2bee68bada121e787d678 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 79aef0d35a0de4539a2dd8b0a78fa14fb9147952..b8e1657d013834eaad46a0943aead34ed5cb519f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index da56c470fb6ef674576b28c652592db751d79327..292b6e161aebae99848602c00c5cc3bac946182d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,6 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams device // expected-error {{expected '(' after 'device'}}
   foo();
 #pragma omp target teams device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -24,7 +25,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target teams device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
-#pragma omp target teams device (argc + argc)
+#pragma omp target teams device (argc + argc + z)
   foo();
 #pragma omp target teams device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'device' clause}}
   foo();
index 7495a18443f31150164630a84a19955bc1b0b5fd..43528dad0ebd918c6c9a172a953e40a85efaccc5 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 539a296f2674c0480f3fb503abe3dc053bbae815..fd834e7cba32c7bfcd116534f995d92db54243f0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index a31015255ccf48db5b456e74ed16c7aa093ba18a..1842069227f80e538625349e1598197ec14d1c94 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 14c7745155d3e265c9c2fd19a5982a1548035e10..bb10a8f300a762fa90f70c445088b43c5c42e7f9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index aa62e0997168eeaf3dd812c620b0800a6d0fd434..a50931d3057286f28f1078096f82141d0236e985 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute device (argc + argc)
+#pragma omp target teams distribute device (argc + argc + z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index 2544b1b9abbca9fc3b72aa1f7b55268ffa6d8026..69c1e55eeaa3b857b4b9458b2ef49472c0ba6fa7 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
 #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
 
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
index 3e00beac7fd6f915bc8ff37ee7d27e14c7d2e704..8d53c3cbc0b3957cdc722bf2d935ace2be7d3ca4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target teams distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -113,7 +113,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute firstprivate(da)
+#pragma omp target teams distribute firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute firstprivate(S2::S2s)
index 94d82ab5ae655d4757e7e110642f58792a20ce5e..fd1ffb08cbe8ccede50d07f891da6f478f7e0ac8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}}
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
   int i;
+  T z;
 #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 
@@ -26,7 +27,7 @@ int tmain(T argc, S **argv) {
 #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
+#pragma omp target teams distribute if (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2])
@@ -84,7 +85,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 
@@ -97,7 +98,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
+#pragma omp target teams distribute if (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2])
index a7e33d0e78efda7a6684f751cf4ab790ed208820..d02557c4e724cf2f533bfe81e50f4e0572a49b8c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 0ce8cbf71baac538f9e027768df9b66a777c75e8..ecf364e21188881fe5e3f04222dd9e128a675961 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index 0de429736e170976dc3af21fedeb52e063dead40..f14233f49c0554396eaa91af137702b91091991d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index 7b2080ae2b06cc939d919f28c18ddc5d28cebb3c..a685acf7f3e6f6ccd6c2c652f6d2e6b2f9c108f3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 6d17b512619a33f9ec80188aac94bd61e1caac03..8fbe7c055b333a3d9fc46d902d897cbafd64ab28 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}}
 #pragma omp target teams distribute
index b7a9a2548be5ca6543762ed687b8a014585b006a..75bab8001bfb7c248e52c39d5cc28d09dc92c3e0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo() {
 }
index 8b351dc8fb4af97135c7e1bf47592d46c53d5a2e..c0a31fa19b2822c7c12a32c07c6b750baf14dfdb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute num_teams(C)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute num_teams(argc + argc)
+#pragma omp target teams distribute num_teams(argc + argc + z)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}}
   for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 
-#pragma omp target teams distribute num_teams (argc + argc)
+#pragma omp target teams distribute num_teams (argc + argc+z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target teams distribute num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}}
index a866b797641f559bb9fc9467cfd567d309119a89..502e4047ea159d36d44dd8289e5acd77ccf1a1bc 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
 
 void foo() {
 }
index d5ea823858ba8ce544178cb7a1c1e26f09048052..00e0704a6ccace88b61d7b5338c29aef65888f62 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index 8de99aeb214beeb76a653c1b6cf2c4991600b548..ae17c2bf9dbf1f78a9df0fcff3cb472967ca7fd1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index d853771c0d888a6614459bc34a0f8e1ea273d297..621f35808ce63c57f753d5a1d5a58705befafcc9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 64b682a601b3e85d45cdc6326a9dc378f2ee7758..e78807a09feec50fa172e2c25aeae4f62edfdad3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute parallel for device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -21,7 +21,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for device (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
index a8abaffb464a67c65b981a70a0891198eded5c00..a0efad18668e9259be7afec2495b6147e0580e80 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
 #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
 
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
index d7be6062eb047aee4d5d5e45d43f224e3485b332..a03c781892bca8a36a5af08a33b5aa89da465d13 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target teams distribute parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute parallel for firstprivate(da)
+#pragma omp target teams distribute parallel for firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute parallel for firstprivate(S2::S2s)
index 328e191ed35ee7b70ebacf79f1fecd35f8b3996d..e1114028b687759fa40e3a140d5183f334224496 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for if(argc)
+#pragma omp target teams distribute parallel for if(argc -z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -61,7 +61,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for if(parallel : argc)
+#pragma omp target teams distribute parallel for if(parallel : argc / z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams distribute parallel for'}}
   for (i = 0; i < argc; ++i) foo();
index e19e46c57b71f426df0d53c213015c5f23c30c80..fdf98d40ea8571bb208ebe94258351b277f837c1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 struct ST {
   int *a;
 };
index d06628fef88677e63ed4d826d2aa4fb320cc7de3..820010bea4cc3cbafe06eb707d0eaf01611e118d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index ca537dd976ddd48fca05828b946468bba1c92e37..a7fe130a0d0b2e18d8c2f4960aff4076794a7751 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index f47655d686b6b41dc02e8c37c6092be6d1181121..c67b1835345a5811158af68f4f829045a99d8d05 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -61,7 +61,7 @@ T tmain(T argc) {
   T &j = i;
   T *k = &j;
   T x;
-  T y;
+  T y, z;
   T to, tofrom, always;
   const T (&l)[5] = da;
 
@@ -102,7 +102,7 @@ T tmain(T argc) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for map(S2::S2sc)
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for map(x)
+#pragma omp target teams distribute parallel for map(x, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for map(to: x)
   for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
   int &j = i;
   int *k = &j;
   int x;
-  int y;
+  int y, z;
   int to, tofrom, always;
   const int (&l)[5] = da;
 
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for map(argv[1])
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for map(ba)
+#pragma omp target teams distribute parallel for map(ba, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for map(ca)
   for (i = 0; i < argc; ++i) foo();
index e70c5df3898f980c5e9586c639255617e4d7b8a4..a9a7ca1617d27880611b9c80ecc0d4a4a703d340 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 820eb11189a3ca90674fa0d11135ad944c559132..0e59e0d18f59f9212ea74b16855df2f78d59fa7f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
 #pragma omp target teams distribute parallel for
index d0e679936e6c44e1868887613a3ee9ef08052ef7..f6b6061dd42b7076db8f4978007510ff41ee0b02 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index ceb4fa567c69dabbde2777f6ec51b231d8bf8fc5..d80b6ea380b93734f1905055dc646e2b5fba8da1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute parallel for num_teams(C)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for num_teams(argc + argc)
+#pragma omp target teams distribute parallel for num_teams(argc + z)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
   for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 
-#pragma omp target teams distribute parallel for num_teams (argc + argc)
+#pragma omp target teams distribute parallel for num_teams (argc + z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target teams distribute parallel for num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
index f558936afae6be3e216bb3bf2b9baebd3de7041b..d4b0c02c4393e6006c3d83c45c4140e68fe90b6b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for num_threads (argc - z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
+#pragma omp target teams distribute parallel for num_threads (z - argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index 86410b3fafd38aff455c045a363baa8508aef541..eb5a4d63cadfc4c7c4d9a45f941ac92dcdd47028 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 659684e6f1e3c1c0e16eaf499e738680d675ba9f..11deefb2aa7b9f33e83b5b58880bf999c7b7b226 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 01175deeca9b59efcc48d71d85dc62a13342cb4b..296c0b0f66c43a92332bebd7d182a0d07c387c02 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -127,7 +127,7 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for reduction(+ : z, ba) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for reduction(- : da, z) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
   for (int j=0; j<100; j++) foo();
index 1f4f5f12e87b376837a1b473c8b252a5ab65f733..03bc0ff1d1f60d46856d16bc2c69c02b94cfda9b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
 // expected-error@+1 {{expected '(' after 'schedule'}}
 #pragma omp target teams distribute parallel for schedule
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -50,7 +51,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
-#pragma omp target teams distribute parallel for schedule (dynamic, 1))
+#pragma omp target teams distribute parallel for schedule (dynamic, z+1))
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #pragma omp target teams distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
@@ -81,6 +82,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 // expected-error@+1 {{expected '(' after 'schedule'}}
 #pragma omp target teams distribute parallel for schedule
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
@@ -114,7 +116,7 @@ int main(int argc, char **argv) {
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
 
 // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
-#pragma omp target teams distribute parallel for schedule (static, 2+2))
+#pragma omp target teams distribute parallel for schedule (static, 2+2 + z))
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
 
 #pragma omp target teams distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
index f90a533edfee62ed108ac18f94b8de43f9f5de73..75192796077659b39205993048f164071c44c140 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp target teams distribute parallel for shared // expected-error {{expected '(' after 'shared'}}
   for (int j=0; j<100; j++) foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for shared (S1) // expected-error {{'S1' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for shared (a, b, c, d, f)
+#pragma omp target teams distribute parallel for shared (a, b, c, d, f, k)
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for shared (argv[1]) // expected-error {{expected variable name}}
   for (int j=0; j<100; j++) foo();
index 18685d2b30ed0728b7d9559378a0b31fb242eb22..4be19a4c76b8cd122d5c64f378c850ab9522b4d3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 4ca7a8ca9adfa6c48ae6cced26f7ac1ab8171a27..81adc34c4dd4a29dc4c4366d8f96b1127dbdb4ac 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
 
 void foo() {
 }
index d832d8cf1616c155e31cdb3b0d0dd8508a4777bc..7c46c964d2ec3b2090b368605be86827504561b7 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index c2c0e7be213028050f82466109d60dbb3d92ede6..70361a13965f0ded9c043ebaa8d196cde5985737 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 2690b01e222fe9e6a746398fc48e5e62d8a2b211..d0735e435003335f750285c2b3e6547158743b0c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index c7b3bc9098db6ba424daad273414708c06c50a7f..bd68f36ae0fbaaeed603f86c5c485e1ccce6f486 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute parallel for simd device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd device (argc + argc)
+#pragma omp target teams distribute parallel for simd device (argc + argc + z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index 079aaf69f556bd30356803201d3e419f2197fd20..ec634c8ac01c9ca4d8eaadec784efa5e56e89280 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
 #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
 
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
index 46a91c953b7e4974fdb418341506a10d80076e0a..d018421fa8a4304ee5bd36c865d242818f4e792f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -23,7 +23,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration
 extern S1 a;
 class S2 {
   mutable int a;
-  
+
 public:
   S2() : a(0) {}
   S2(const S2 &s2) : a(s2.a) {}
@@ -36,7 +36,7 @@ const S2 ba[5];
 class S3 {
   int a;
   S3 &operator=(const S3 &s3);
-  
+
 public:
   S3() : a(0) {} // expected-note 2 {{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
   S3(S3 &s3) : a(s3.a) {} // expected-note 2 {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target teams distribute parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute parallel for simd firstprivate(da)
+#pragma omp target teams distribute parallel for simd firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute parallel for simd firstprivate(S2::S2s)
index 7554e5bc0590a72b257a5abfe488e94330727fca..59c75893a171466ac101323118ff08e68209849b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, k;
 #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -22,7 +22,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
   for (i = 0; i < argc; ++i) foo();
@@ -73,7 +73,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, k;
 #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
   for (i = 0; i < argc; ++i) foo();
index 57abff3fb48ed0c0f2c74d7206e486a0a59634ec..b368f2a3f54866ba2239c159b24120b96359b83a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 struct ST {
   int *a;
 };
index 26520795149c942bb5c13e6b299ab6e15b564acc..c273321068f2a1c6cebb16498b3c91dcc2d9364e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
 
-#pragma omp target teams distribute parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp target teams distribute parallel for simd lastprivate(e, g, z) // expected-error 2 {{calling a private constructor of class 'S4'}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target teams distribute parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
   float k;
 #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute parallel for simd lastprivate(ba)
+#pragma omp target teams distribute parallel for simd lastprivate(ba, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
index 029401a64c87535f6d3b45d459546fee18306d5e..111fe99bf856e2bca6a02114cbebd39640ce1bc8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 6c7cb795059f4f7274c2fd7c67243ba432cf20d8..fda6b5ff316e858e353a03d93509ba63908a81da 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index 64fe5f6e092935c6d90868aba97e2e12a4c448c0..908184805a8c0bc627680e286b6ae45bb698c2ce 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -61,7 +61,7 @@ T tmain(T argc) {
   T &j = i;
   T *k = &j;
   T x;
-  T y;
+  T y, z;
   T to, tofrom, always;
   const T (&l)[5] = da;
 
@@ -88,7 +88,7 @@ T tmain(T argc) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd map(l[true:true])
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd map(x)
+#pragma omp target teams distribute parallel for simd map(x, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd map(tofrom: t[:I])
   for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
   int &j = i;
   int *k = &j;
   int x;
-  int y;
+  int y, z;
   int to, tofrom, always;
   const int (&l)[5] = da;
 
@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd map(to)
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd map(to, x)
+#pragma omp target teams distribute parallel for simd map(to, x, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd map(to x) // expected-error {{expected ',' or ')' in 'map' clause}}
   for (i = 0; i < argc; ++i) foo();
index a98f7d83ecdce1d45aaa498ec0285b54f9d7ab8b..f6050925d644a2dcd0ee8a354f6c1bc735f6000a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 7005c7b027a8e65f7a62e7b25b37636ebe5dffbb..07db3991bba61dba84826f6a8c32dbac55666199 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}}
 #pragma omp target teams distribute parallel for simd
index 458eaf72c3403da6add54e898e7f5e6aefeba292..0f13d35c06717a6753505b36e8035860e8dab1c2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 6564f104a126ca34b7ae0fac7c7fc5d078aade72..8d611f76ed5ad508c4ce47f2695efad308ed38e9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute parallel for simd num_teams(C)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for simd num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute parallel for simd num_teams(argc + argc)
+#pragma omp target teams distribute parallel for simd num_teams(argc + argc/z)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
   for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 
-#pragma omp target teams distribute parallel for simd num_teams (argc + argc)
+#pragma omp target teams distribute parallel for simd num_teams (argc + argc-z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target teams distribute parallel for simd num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
index 58fab1e8df63e3b442c3cdc7d7021af468a48fea..397c83d199e9e27b266453e57332075f2b378d6c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, k;
 #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -32,7 +32,7 @@ T tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd num_threads (argc)
+#pragma omp target teams distribute parallel for simd num_threads (argc + k)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}}
   for (i = 0; i < argc; ++i) foo();
@@ -41,7 +41,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, k;
 #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
+#pragma omp target teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
   for (i = 0; i < argc; ++i) foo();
index 1f3a1313269c19a62c6ec1a374223722674753e2..8598fb6663ccd5efbc3cbe5bb557c43ab4677131 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 3ae5268667d34545e5727143ea5bd294453f66db..ffac5417c985aae8cb13cb604efc4241fb383c70 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo();
 
index 6e298a7e6b00e2a4f3a733d2a5d7f093e9e983c6..9336d94807d16155ff23867e96f24fc4ea690656 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -121,7 +121,7 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -210,7 +210,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute parallel for simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
   for (int j=0; j<100; j++) foo();
index d05f071e9159b58df43e39d8e9ed8f566fbd2085..14ac5da1b58e654e9f01ef6250a8ef66fcc91025 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index c24a5431842812ee98f5dc1803302f31d02c6794..96b5aac2a53ff80fb3ead73b3e54732e2208bb66 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T z;
 // expected-error@+1 {{expected '(' after 'schedule'}}
 #pragma omp target teams distribute parallel for simd schedule
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -50,7 +51,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
-#pragma omp target teams distribute parallel for simd schedule (dynamic, 1))
+#pragma omp target teams distribute parallel for simd schedule (dynamic, 1 + z))
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #pragma omp target teams distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2)
@@ -81,6 +82,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 // expected-error@+1 {{expected '(' after 'schedule'}}
 #pragma omp target teams distribute parallel for simd schedule
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
@@ -117,7 +119,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd schedule (static, 2+2))
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
 
-#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : z)
   for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
 
 // expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'schedule' clause}}
index f59ecbd58378d15b7334dea9c1e21b779a483ae8..89d78744c90d3e1c967608d97b6e9857c7827202 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp target teams distribute parallel for simd shared // expected-error {{expected '(' after 'shared'}}
   for (int j=0; j<100; j++) foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
   #pragma omp target teams distribute parallel for simd shared (S1) // expected-error {{'S1' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-  #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f)
+  #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f, z)
   for (int j=0; j<100; j++) foo();
   #pragma omp target teams distribute parallel for simd shared (argv[1]) // expected-error {{expected variable name}}
   for (int j=0; j<100; j++) foo();
index 1c490582fd84e9f2cb4b5d510648ce58b3f37de1..e0c89d4c9907b2c77452cb106ee5ee7f083d5418 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -33,9 +33,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{expression is not an integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
-  for (int i = ST; i < N; i++) 
+  for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
-  
+
 #pragma omp target teams distribute parallel for simd safelen (ST // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -45,7 +45,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
      argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #pragma omp target teams distribute parallel for simd safelen ((ST > 0) ? 1 + ST : 2)
-  for (int i = ST; i < N; i++) 
+  for (int i = ST; i < N; i++)
     argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #if __cplusplus >= 201103L
@@ -102,7 +102,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
   for (int i = 4; i < 12; i++)
     argv[0][i] = argv[0][i] - argv[0][i-4];
-  
+
 #if __cplusplus >= 201103L
   // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
 #endif
index ea8b1a77513e51606b5645e29384dda07f8ed58c..1905b55478401b27ce13eb6ecd48336212e4ce15 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute parallel for simd thread_limit(C)
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute parallel for simd thread_limit(argc + argc)
+#pragma omp target teams distribute parallel for simd thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
   for (int j=0; j<100; j++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 
-#pragma omp target teams distribute parallel for simd thread_limit (argc + argc)
+#pragma omp target teams distribute parallel for simd thread_limit (argc + argc-z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target teams distribute parallel for simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
index bd04e934a245134914c67e02315975721b7bc64b..a015f9984ea63ed279fd01f912861f9a8b436e63 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute parallel for thread_limit(C)
   for (int j=0; j<100; j++) foo();
 
@@ -38,7 +39,7 @@ T tmain(T argc) {
 #pragma omp target teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 
-#pragma omp target teams distribute parallel for thread_limit(argc + argc)
+#pragma omp target teams distribute parallel for thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
@@ -60,6 +61,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
 
@@ -78,7 +80,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute parallel for thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 
-#pragma omp target teams distribute parallel for thread_limit (argc + argc)
+#pragma omp target teams distribute parallel for thread_limit (argc -z + argc)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target teams distribute parallel for thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
index 93989a58401557d1dddc970745536a9db61dc959..a2233ed076070742a5937a8477bbe3539c70a718 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index bdde93bd93a0504759fdc12dd939c7684efe29b2..b0f30e2eef265f7c076ace4f6518d7dd663bf7ca 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -213,7 +213,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
index 37e0aa1b5b6ef1160b899fdcabed79886954b5b7..21b7060f773d4850c06b734003fcc105f7e441f4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 2ec53ee99e09cddbac0593edaebbe0e2595cf5ff..2e70bb3ac43d15ff98269fa7dfec0bd0700fbff7 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 6561091ec8a5dede15081c7038d930e11602d226..612fc728a857e22cdb04dc8729ba69b013d159c7 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b8ac8aee672afa90273ccf4bea96bf9152320e76..88f912506080b384dded65da347e55ea658bbfd8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 7e2012ace37192558418f59d190396c22c259344..2e1be6c725b42f61586b99e4bd53beb80c23d363 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 1f47d1c7263628b8de056b218d067dc3aca250b6..993ff49125311b9622d43d120e4ff4fc24d4aee9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -12,7 +12,7 @@ bool foobool(int argc) {
 struct S1; // expected-note {{declared here}}
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute simd device // expected-error {{expected '(' after 'device'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -25,7 +25,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd device (argc + argc)
+#pragma omp target teams distribute simd device (argc + argc + z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'device' clause}}
   for (i = 0; i < argc; ++i) foo();
index b9fdc18a0ec0d0c70c703a13ac235c2a97480fa8..507ddabd2fc2074703328deef9da65fdb536281d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -39,7 +39,7 @@ T tmain(T argc) {
 #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
@@ -52,6 +52,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
 
@@ -73,7 +74,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i = 0; i < 10; ++i) foo();
 
-#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}}
index 1ce3adc74d6ad8a24116be7f7d1be149a1f63a44..82274fe00e27eb20ac5bd289b0b9835584677204 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target teams distribute simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -112,7 +112,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute simd firstprivate(da)
+#pragma omp target teams distribute simd firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute simd firstprivate(S2::S2s)
index 43d8957f00657a6fd8d6751d950358380155f1ce..7134a8394cbb855a74c523a888896b7b40a28964 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -34,7 +34,7 @@ int tmain(T argc, S **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd if(argc)
+#pragma omp target teams distribute simd if(argc * z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if(target // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
@@ -57,7 +57,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -88,7 +88,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if(target: argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd if(target: argc)
+#pragma omp target teams distribute simd if(target: z/argc)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd if(target : argc) if (distribute:argc) // expected-error {{directive name modifier 'distribute' is not allowed for '#pragma omp target teams distribute simd'}}
   for (i = 0; i < argc; ++i) foo();
index 34083056926357cf6e8ff9e544f138db8c716616..3de17bf0ceccd7cef9fed02c2af5bea9808dc935 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 struct ST {
   int *a;
 };
index 1235f81a21282e6d4954213e51ac8786c845712e..f7fb69f052728b880f01d8f9bdd7256d6843b327 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -110,7 +110,7 @@ int foomain(int argc, char **argv) {
 #pragma omp target teams distribute simd lastprivate(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
 
-#pragma omp target teams distribute simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp target teams distribute simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target teams distribute simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
@@ -152,7 +152,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
   float k;
 #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd lastprivate(2 * 2) // expected-error {{expected variable name}}
   for (i = 0; i < argc; ++i) foo();
 
-#pragma omp target teams distribute simd lastprivate(ba)
+#pragma omp target teams distribute simd lastprivate(ba, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}}
index f4131ed7aedc351ab1562c8c4fae128b31e5eec6..90b719c8d2144e17c731bc75810f7467d628d327 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index cba8e8205611dedebfd16a50168f3afa763f56a7..1ec1e3bd8f4c377dc464af8e26ae421ee1109e91 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized
 
 class S {
   int a;
index 3806c4ecf5b056deed5127d5840cb68b4df6db15..313bd7400a7d7f5a70b9524808a402247612dce1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -61,7 +61,7 @@ T tmain(T argc) {
   T &j = i;
   T *k = &j;
   T x;
-  T y;
+  T y, z;
   T to, tofrom, always;
   const T (&l)[5] = da;
 
@@ -102,7 +102,7 @@ T tmain(T argc) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd map(S2::S2sc)
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd map(x)
+#pragma omp target teams distribute simd map(x, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd map(to: x)
   for (i = 0; i < argc; ++i) foo();
@@ -184,7 +184,7 @@ int main(int argc, char **argv) {
   int &j = i;
   int *k = &j;
   int x;
-  int y;
+  int y, z;
   int to, tofrom, always;
   const int (&l)[5] = da;
 
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd map(argv[1])
   for (i = 0; i < argc; ++i) foo();
-#pragma omp target teams distribute simd map(ba)
+#pragma omp target teams distribute simd map(ba, z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target teams distribute simd map(ca)
   for (i = 0; i < argc; ++i) foo();
index 6ee8073357f4cda94d625493f336954fd1b912de..77e85f1c137660e7ccfdd1c18e134ce2154f63c5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 397795ff6e0a9ad9b4cfdcbf4596effe84409cf0..45f310ffdf6c0eb18f644c08505dec766817569a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}}
 #pragma omp target teams distribute simd
index 25daa81eb744788e94dddc84195fd0c0c824cabb..1a9d0b5a51625f0cdf940662f78be9150a512d8f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index cdc5244fe1ef5ae1d893e343bd6698cf93aadb13..7c44d6861ef83e7925772a0501a33beb0003ca98 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute simd num_teams(C)
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute simd num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -26,7 +27,7 @@ T tmain(T argc) {
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute simd num_teams(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i=0; i<100; i++) foo();
-#pragma omp target teams distribute simd num_teams(argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
+#pragma omp target teams distribute simd num_teams(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
   for (int i=0; i<100; i++) foo();
 #pragma omp target teams distribute simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
 
@@ -59,7 +61,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd num_teams (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i=0; i<100; i++) foo();
 
-#pragma omp target teams distribute simd num_teams (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
+#pragma omp target teams distribute simd num_teams (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target teams distribute simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
index 7edcaf19a38005658cf694763eb54faee4760f84..2c53a4a1f83de8a04a29bb79f0206f1c0e017bff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 }; // expected-note {{'da' defined here}}
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, k;
   int &j = i;
 
 #pragma omp target teams distribute simd private // expected-error {{expected '(' after 'private'}}
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
   for (int k = 0; k < argc; ++k) ++k;
 
-#pragma omp target teams distribute simd private (argv[1]) // expected-error {{expected variable name}}
+#pragma omp target teams distribute simd private (k, argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target teams distribute simd private(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams distribute simd' directive}}
index c033c058025968ac40f10ed5e8cffa90e2bdd843..84da687171a32699bedb0849f02933e393bf18b9 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -89,7 +89,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -121,9 +121,9 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams distribute simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
   for (int j=0; j<100; j++) foo();
@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp target teams distribute simd reduction(* : ca, z) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
index da5c8eb75d962e6ae78e390cdeaeb32e2e02e2f9..36af17e935470e29a6b60c54335c3d852ca3f2e4 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 3147baedae8f9ee24a007d6833fc780878a3de34..a32aa2207aa3822521cf58e8c211493ef5f6b583 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp target teams distribute simd shared // expected-error {{expected '(' after 'shared'}}
   for (int j=0; j<100; j++) foo();
@@ -73,7 +73,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
   #pragma omp target teams distribute simd shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int j=0; j<100; j++) foo();
-  #pragma omp target teams distribute simd shared (argc)
+  #pragma omp target teams distribute simd shared (argc, z)
   for (int j=0; j<100; j++) foo();
   #pragma omp target teams distribute simd shared (S1) // expected-error {{'S1' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
index 851fff36f20350ad54fdb2d087b0a161c60a393f..322c64607d036dedb9ca6908a211c2333bf4ce18 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 593650b38cc7e964d2dac0bb5463a2e0caf3c36f..fcdcde53f3af346c51d1401f395d0ded5a825fcf 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams distribute simd thread_limit(C)
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
-#pragma omp target teams distribute simd thread_limit(argc + argc)
+#pragma omp target teams distribute simd thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}}
   for (int j=0; j<100; j++) foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams distribute simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 
-#pragma omp target teams distribute simd thread_limit (argc + argc)
+#pragma omp target teams distribute simd thread_limit (argc + argc - z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target teams distribute simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}}
index 9f6eb8ad81e8f0374755b4d7c035a3787c0ba343..7958d6f494ae7d3ae6d81c8a2a3313989a74ff03 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -74,7 +74,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target teams firstprivate // expected-error {{expected '(' after 'firstprivate'}}
   foo();
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target teams allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams' directive}}
   foo();
-#pragma omp target teams firstprivate(ca)
+#pragma omp target teams firstprivate(ca, z)
   foo();
 #pragma omp target teams firstprivate(da)
   foo();
index 84c900a41ab3d6511033a792f99ce00e4d4484b6..8d3d690d631fae8b21fff97eefb4e157bb326fb7 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
 #pragma omp target teams if // expected-error {{expected '(' after 'if'}}
   foo();
 #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -21,7 +22,7 @@ int tmain(T argc, S **argv) {
   foo();
 #pragma omp target teams if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-#pragma omp target teams if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}}
+#pragma omp target teams if (z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}}
   foo();
 #pragma omp target teams if (argc > 0 ? argv[1] : argv[2])
   foo();
@@ -52,6 +53,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams if // expected-error {{expected '(' after 'if'}}
   foo();
 #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -80,7 +82,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target teams if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   foo();
-#pragma omp target teams if(target : argc)
+#pragma omp target teams if(target : z)
   foo();
 #pragma omp target teams if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams'}}
   foo();
index 8ae6d7fed0e16e99e75e4db1f0dd4d25891aa79b..1885d1e6994bd03a5751fec4d3381fcd0da333dc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized
 
-// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s
+// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized
 struct ST {
   int *a;
 };
index 8608756bd4ee694edeb0081754e4da196d82b3a7..d70598b384b578a654e8f74b2e0b89e661987a6d 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target
-// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized
 #ifdef CCODE
 void foo(int arg) {
   const int n = 0;
index 362767ef1d885ee9cccefd22b26055e59b861fae..406b9841f506dbc7f2b6b0434e6d1cef67eaa529 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index aeb182940315747766189c532b6dff2a876eaba0..bed2f979891e9f5735c691ddc71c54e9630cf6d0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo() {
 }
index 9134af640c9029e35af982a1860444f2d0768636..94f4c0f811b35abe451d22eb901f6dcf03b8a0e1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams num_teams(C)
   foo();
 #pragma omp target teams num_teams(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
-#pragma omp target teams num_teams(argc + argc)
+#pragma omp target teams num_teams(argc + argc + z)
   foo();
 #pragma omp target teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}}
   foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams num_teams // expected-error {{expected '(' after 'num_teams'}}
   foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
 
-#pragma omp target teams num_teams (argc + argc)
+#pragma omp target teams num_teams (argc + argc*z)
   foo();
 
 #pragma omp target teams num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}}
index 7714113af70602e81287e49279f9b7c6fd4697c6..85309e953b92302f1fc418e6dd56dfccd8fce98a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 }; // expected-note {{'da' defined here}}
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target teams private // expected-error {{expected '(' after 'private'}}
   foo();
@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target teams firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}
   foo();
-#pragma omp target teams private(i)
+#pragma omp target teams private(i, z)
   foo();
 #pragma omp target teams private(j)
   foo();
index 2d8a47b7f89415e69ea5b7338626d017ac5f0db6..77684296fd077a2122df328b5037e8510868c3a3 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -94,7 +94,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target teams reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   foo();
-#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp target teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   foo();
 #pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   foo();
@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -219,7 +219,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp target teams reduction(~ : argc) // expected-error {{expected unqualified-id}}
   foo();
-#pragma omp target teams reduction(&& : argc)
+#pragma omp target teams reduction(&& : argc, z)
   foo();
 #pragma omp target teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
   foo();
index 3fb84967b9d92dd15b890045e9b1e4713846368e..5a0947305af8f3555b80aa483749000676ac060a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
index 4b0a4b05c82894c9ee8ecf4c0d8771b75bbd0e52..0693e64a71148db14ad53d2629fc6dee83d30c42 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target teams thread_limit(C)
   foo();
 #pragma omp target teams thread_limit(T) // expected-error {{'T' does not refer to a value}}
@@ -30,7 +31,7 @@ T tmain(T argc) {
   foo();
 #pragma omp target teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
-#pragma omp target teams thread_limit(argc + argc)
+#pragma omp target teams thread_limit(argc + argc + z)
   foo();
 #pragma omp target teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}}
   foo();
@@ -47,6 +48,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target teams thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   foo();
 
@@ -65,7 +67,7 @@ int main(int argc, char **argv) {
 #pragma omp target teams thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
 
-#pragma omp target teams thread_limit (argc + argc)
+#pragma omp target teams thread_limit (argc + argc/ z)
   foo();
 
 #pragma omp target teams thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}}
index 016219c073b89458d56cb421efec5c6c559852dd..e09284f729157b7953e8d83b631906f323428eeb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 228b4a800a0403efc077c035f6651f218a5d0590..8b4aefaf580d8bc2c159bb8fc83dd07d8fc9f368 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,14 +13,14 @@ struct S1; // expected-note 2 {{declared here}}
 
 template <class T, class S>
 int tmain(T argc, S **argv) {
-  int i;
+  int i, z;
 #pragma omp target update to(i) device // expected-error {{expected '(' after 'device'}}
 #pragma omp target update to(i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(i) device () // expected-error {{expected expression}}
 #pragma omp target update to(i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}}
 #pragma omp target update from(i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-#pragma omp target update from(i) device (argc + argc)
+#pragma omp target update from(i) device (argc + z)
 #pragma omp target update from(i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}}
 #pragma omp target update from(i) device (S1) // expected-error {{'S1' does not refer to a value}}
 #pragma omp target update from(i) device (3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}}
@@ -28,14 +28,14 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int j;
+  int j, z;
 #pragma omp target update to(j) device // expected-error {{expected '(' after 'device'}}
 #pragma omp target update from(j) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(j) device () // expected-error {{expected expression}}
 #pragma omp target update from(j) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(j) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}}
 #pragma omp target update from(j) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
-#pragma omp target update to(j) device (argc + argc)
+#pragma omp target update to(j) device (z + argc)
 #pragma omp target update from(j) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}}
 #pragma omp target update to(j) device (S1) // expected-error {{'S1' does not refer to a value}}
 #pragma omp target update from(j) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}}
index e5a1f045e23073ff0891a3377500e6cc32ad4880..b5e7c5004e1348ae240d85271324be0f66c39fff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index 4f229a768c7e512db30851ab04a9b301610805d9..9ded332b04eb983031d8d365ef38f1b05a105276 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -24,11 +24,11 @@ int tmain(T argc, S **argv) {
 #pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}}
 #pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update from(n) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update to(n) if(argc)
+#pragma omp target update to(n) if(argc + n)
 #pragma omp target update from(n) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update from(n) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update to(n) if(target update : argc)
+#pragma omp target update to(n) if(target update : argc + n)
 #pragma omp target update from(n) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}}
 #pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}}
 #pragma omp target update from(n) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
@@ -52,7 +52,7 @@ int main(int argc, char **argv) {
 #pragma omp target update to(m) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update from(m) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
 #pragma omp target update to(m) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-#pragma omp target update from(m) if(target update : argc)
+#pragma omp target update from(m) if(target update : argc + m)
 #pragma omp target update to(m) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}}
 #pragma omp target update from(m) if(target update : argc) if (target update:argc)  // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}}
 #pragma omp target update to(m) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
index 68b76344b9d9796f11d30f425114fbc9926cbb7f..0adb87584e1d2275f05c933735e706330da85dfc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
index fb3d035af9d3385b791b45a1f495efc559a349d8..fc0314a31874fc404757f06ba0fd0f2d78cf41cd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 int main(int argc, char **argv) {
   int i;
index 58f6aee234b3a83395726f14b9e1a44701c1a481..296b25843a538cacb26ba490a28d2bb4b5b1758d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index 0eb26856e78af1efb8a69d22fa94224de2b3fa9c..4826c253aa043498ec5c819a46eef467ed0859b8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 12d1d1a684e46b4dd3af30e7206206679153e596..63ad8474817fbb5efe7097feae8ad4be003a311e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 49b9bfe204fd1dc48ca25f4838b4456f081cd4c4..7cfdf8c635be33ea5f0293ec114adfbae71823f4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,11 +13,12 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp task final // expected-error {{expected '(' after 'final'}}
   #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task final () // expected-error {{expected expression}}
   #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+  #pragma omp task final (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
   #pragma omp task final (argc > 0 ? argv[1] : argv[2])
   #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
   #pragma omp task final (S) // expected-error {{'S' does not refer to a value}}
@@ -30,11 +31,12 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp task final // expected-error {{expected '(' after 'final'}}
   #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task final () // expected-error {{expected expression}}
   #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+  #pragma omp task final (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
   #pragma omp task final (argc > 0 ? argv[1] : argv[2])
   #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
   #pragma omp task final (S1) // expected-error {{'S1' does not refer to a value}}
index f299c755183da621584afe734c5952f69e1e1433..b8ff2cdebc91241ed9fbb0be3c7c644ea65f26c8 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -92,7 +92,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   static int m;
 #pragma omp task firstprivate                               // expected-error {{expected '(' after 'firstprivate'}}
@@ -106,7 +106,7 @@ int main(int argc, char **argv) {
 #pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
 #pragma omp task firstprivate(argv[1])       // expected-error {{expected variable name}}
 #pragma omp task allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}}
-#pragma omp task firstprivate(ca)
+#pragma omp task firstprivate(ca,z )
 #pragma omp task firstprivate(da)
 #pragma omp task firstprivate(S2::S2s)
 #pragma omp task firstprivate(S2::S2sc)
index fca57bb05d0d7b7beda97cbab70c811e9bd761ad..305af22149d85ef722de80ed2658ee3ded3938d4 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp task if // expected-error {{expected '(' after 'if'}}
   #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if () // expected-error {{expected expression}}
@@ -23,7 +24,7 @@ int tmain(T argc, S **argv) {
   #pragma omp task if (S) // expected-error {{'S' does not refer to a value}}
   #pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp task if(argc)
+  #pragma omp task if(argc + z)
   #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if(task : argc)
@@ -36,6 +37,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp task if // expected-error {{expected '(' after 'if'}}
   #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if () // expected-error {{expected expression}}
@@ -50,7 +52,7 @@ int main(int argc, char **argv) {
   #pragma omp task if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
-  #pragma omp task if(task : argc)
+  #pragma omp task if(task : argc + z)
   #pragma omp task if(task : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp task'}}
   #pragma omp task if(task : argc) if (task:argc) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause with 'task' name modifier}}
   #pragma omp task if(task : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}}
index 92bb14983b870609d4282bddd087700b620dcaf9..e52b2fae5c7ed79b289bf0e36e0ff508997df282 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 2e184ce1a911f2f03d8712d5c6cb18925be6ad6a..140e8f0b7198114a580b92e1e597e5b4ea44b11a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp task priority // expected-error {{expected '(' after 'priority'}}
   #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task priority () // expected-error {{expected expression}}
   #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
-  #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
   #pragma omp task priority (S) // expected-error {{'S' does not refer to a value}}
   #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -30,12 +31,13 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+int z;
   #pragma omp task priority // expected-error {{expected '(' after 'priority'}}
   #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task priority () // expected-error {{expected expression}}
   #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
-  #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] - z)
   #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}}
   #pragma omp task priority (S1) // expected-error {{'S1' does not refer to a value}}
   #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
index 934f5aad8c5e0ab9228d2a65055924bf51c9d11c..df082a56314e2e22d193b264ea6a0b29f01da8cb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0}; // expected-note {{'da' defined here}}
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp task private                               // expected-error {{expected '(' after 'private'}}
 #pragma omp task private(                              // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
 #pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
 #pragma omp task private(argc argv)                    // expected-error {{expected ',' or ')' in 'private' clause}}
 #pragma omp task private(S1)                           // expected-error {{'S1' does not refer to a value}}
-#pragma omp task private(a, b, c, d, f)                // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
+#pragma omp task private(z, a, b, c, d, f)                // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}}
 #pragma omp task private(argv[1])                      // expected-error {{expected variable name}}
 #pragma omp task private(ba) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}}
 #pragma omp task private(ca)           // expected-error {{const-qualified variable without mutable fields cannot be private}}
index bdd46ab4282572748cc9c61769742b210c4d64fa..309d56b423f8c2e09fff7080ce8810044e441b0b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -63,7 +63,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp task shared                               // expected-error {{expected '(' after 'shared'}}
   foo();
@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp task shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   foo();
-#pragma omp task shared(argc)
+#pragma omp task shared(argc, z)
   foo();
 #pragma omp task shared(S1) // expected-error {{'S1' does not refer to a value}}
   foo();
index dfb4725280bb445e5d7a0847866a518f43a7036a..f7503ff3c14b0e0bb808cd6afb82b1a83f225dca 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 int foo();
 
index 64d7c6c3ca1a1f817b2cf59fc4b17fb553a3db5e..fe7baf4091dd513ac42ce162a7105fd03c828a7e 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -85,7 +85,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -137,7 +137,7 @@ T tmain(T argc) {
   foo();
 #pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
   foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}}
   foo();
 #pragma omp parallel private(k)
 #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
@@ -178,7 +178,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
   foo();
 #pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
   foo();
-#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable overloaded '='}}
   foo();
 #pragma omp parallel private(k)
 #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}}
index 091b8b832125934ff304ef28fc19c1f0f1ae4bf0..5551a0254e141689365bdd4920fa2e1f9c83abd0 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
   // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
   // expected-error@+2 2 {{expression is not an integral constant expression}}
   // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
-  #pragma omp taskloop collapse (argc 
+  #pragma omp taskloop collapse (argc
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
   #pragma omp taskloop collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
index d53b12322e93e3c1b20d3540021d5f51c2d05617..f7ef2959df3dec03b83e74d4db270a32d69c5597 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
 #pragma omp taskloop final // expected-error {{expected '(' after 'final'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
 #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2])
+#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] + z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}}
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp taskloop final // expected-error {{expected '(' after 'final'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2])
+#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] - z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}}
index fde767da94ef44c69c49ba057d289c39e27be704..9ef869f50ae2e09d1dcdb2908ec6b744af594fec 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -119,7 +119,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp taskloop firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
+#pragma omp taskloop firstprivate(z, e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
index a1cfea474c977839fbec509b71e3a07cd8e04a44..174d910d9fb9e170fc853db2c4bb70c9baeffa3a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}}
index 00c17d0a19b35d8a64bc4b63f7c6e3d8ac849b94..1441637ed280abf64f526a518dc6c5a504c0ba83 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
index 929d2b801c5b08b1c4f51f02d4a50570e8482ccd..3d3aceea84de7c1164ba34aa87ccfe3f8a41f03d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -121,7 +121,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp taskloop lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
+#pragma omp taskloop lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp taskloop lastprivate(argc)
+#pragma omp taskloop lastprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index 324114d6d745d712ade7eec704da5b5179b66a5f..d38e8d70963725c471a6196e1435aae0af356493 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 4e2ac0aab7c69d233d00a7bba98a43756af1eb12..6ab4696fc73b1274cd0eb1f61257fa453a5fe738 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop'}}
 #pragma omp taskloop
index cf506ff5df92225624c1a3686d50d1bb7616ba22..71812abc323de600728ca710a06f0cf91c053b4d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}}
index cbfd2579f587fdaed8007daec24c99fbd7cd56c7..2687708baa90d873c7ac9fc550017047784dc781 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] - z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}}
index 107a2f4b766167d423acfba28ff974ac51c1c468..bc563ca112cb65a9fa1fd016869fb8a0e925c00c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp taskloop private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
 #pragma omp taskloop private(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp taskloop private(e, g)
+#pragma omp taskloop private(e, g, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp taskloop private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp taskloop private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -244,7 +244,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop private(j)
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp taskloop private(i)
+#pragma omp taskloop private(i, z)
   for (int k = 0; k < argc; ++k)
     ++k;
   static int si;
index a1c533cfe0903c12a476741e80e824b97abbf5e3..b7a0f2eb0d9f79ec96c172180d79891111ea40fe 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -104,7 +104,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -149,7 +149,7 @@ T tmain(T argc) {
 #pragma omp taskloop reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp taskloop reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -265,7 +265,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop reduction(&& : argc)
+#pragma omp taskloop reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 24cdd00e6b347a91cd3c32482d8eabac7705993d..c7a62b8f4a2dd927bf7d57cf934edf3426897b0d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index fd620c8fc1635a41f1034f8aa536bcb22e6bab55..7730990ac890936d9d0a25e18fb59668f98d5cf8 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b7393661c940d66da37f971f8150a77bc06ccbd8..68360aa1a30f4eaa5cf5cc1080b21e0455de71df 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
 #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
 #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+#pragma omp taskloop simd final(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2])
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -63,7 +65,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+#pragma omp taskloop simd final(z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2])
index 7553bd2fece4053171ee55592557811067569707..1aea8c02a0434dd2a9d05b6e0eceace0d5d735d2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -76,7 +76,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   C g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -115,7 +115,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp taskloop simd firstprivate(argv[1]) // expected-error {{expected variable name}}
+#pragma omp taskloop simd firstprivate(z, argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -182,7 +182,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -209,7 +209,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp taskloop simd firstprivate(argc)
+#pragma omp taskloop simd firstprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index 3441e59e56d0571ac698cd17e08db4dc35fb8709..4c4bf39fe8c67272c3028e5b9b961d300d1c6bff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+  #pragma omp taskloop simd grainsize (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -66,7 +68,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+  #pragma omp taskloop simd grainsize (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc])
index 6ad8bad2a32012dd40b966a0d75206669b909ab3..77243696911bf97990119fa57a78221ea2e9be67 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -125,7 +125,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -163,8 +163,8 @@ T tmain(T argc) {
 #pragma omp taskloop simd in_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
   for (int i = 0; i < 10; ++i)
   foo();
-#pragma omp taskgroup task_reduction(|:argc) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
-#pragma omp taskloop simd in_reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp taskgroup task_reduction(|:z) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp taskloop simd in_reduction(| : z, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
   for (int i = 0; i < 10; ++i)
   foo();
 #pragma omp taskloop simd in_reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}}
@@ -268,7 +268,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -308,8 +308,8 @@ int main(int argc, char **argv) {
 #pragma omp taskloop simd in_reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
   foo();
-#pragma omp taskgroup task_reduction(&&:argc)
-#pragma omp taskloop simd in_reduction(&& : argc)
+#pragma omp taskgroup task_reduction(&&:argc, z)
+#pragma omp taskloop simd in_reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
   foo();
 #pragma omp taskloop simd in_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index ec0d071a1d51c242d296896ae56441b9859cbb9a..70c508fdd0ba0a0fe4dc4845082648e89690f808 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -78,7 +78,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -113,7 +113,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
-#pragma omp taskloop simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp taskloop simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp parallel
@@ -172,7 +172,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp parallel
 #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
-#pragma omp taskloop simd lastprivate(argc)
+#pragma omp taskloop simd lastprivate(argc, z)
   for (i = 0; i < argc; ++i)
     foo();
 #pragma omp parallel
index 05b08d6d75c99121aff8a596cde695e126924b3f..0c1acf370a52d8a0fd0b157e323d207d6ba7fbff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -113,7 +113,7 @@ S3 h;
 template<class I, class C> int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp taskloop simd linear // expected-error {{expected '(' after 'linear'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -149,7 +149,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp taskloop simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp taskloop simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+  #pragma omp taskloop simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}}
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp taskloop simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -204,7 +204,7 @@ int main(int argc, char **argv) {
 
   S4 e(4); // expected-note {{'e' defined here}}
   S5 g(5); // expected-note {{'g' defined here}}
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp taskloop simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}}
   for (int k = 0; k < argc; ++k) ++k;
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp taskloop simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k) ++k;
-  #pragma omp taskloop simd linear (argc)
+  #pragma omp taskloop simd linear (argc, z)
   for (int k = 0; k < argc; ++k) ++k;
   #pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
   for (int k = 0; k < argc; ++k) ++k;
index fcae0130d96c21695e7e5d2e5790f632b8d136b8..666dba520087d906ceff5549935f96edada36900 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index bb4b2dfbb85e9d39da28ed8c9e5f569b30b32a5b..2b6bbe9f378c4f6269e5fe54807d98edf53162a3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
 
 // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}}
 #pragma omp taskloop simd
index 3267d294b7569ccfa2c6f6bad76a14786495d311..0b30d0935b81d987bfa4d49035dc13bfdebc2e94 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -28,7 +29,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}}
@@ -54,6 +55,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -69,7 +71,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc])
+  #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z)
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}}
index 44e0b57a00d335a3e4d31c8a9f189f236bbf7e61..f51cff413709e20b0a8b41a28ef980b5cb80417a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
+  T z;
   #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -25,7 +26,7 @@ int tmain(T argc, S **argv) {
   #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+  #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
@@ -51,6 +52,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
+  int z;
   #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}}
   for (int i = 0; i < 10; ++i)
     foo();
@@ -63,7 +65,7 @@ int main(int argc, char **argv) {
   #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (int i = 0; i < 10; ++i)
     foo();
-  #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
+  #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
   for (int i = 0; i < 10; ++i)
     foo();
   #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc])
index 4198c891c23e1405fdb86e0438387294c524654a..c7b7ba05426bf667ca4e1709c1ef8bb523dde38e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -106,7 +106,7 @@ template <class I, class C>
 int foomain(I argc, C **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -138,7 +138,7 @@ int foomain(I argc, C **argv) {
 #pragma omp taskloop simd private(argv[1]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp taskloop simd private(e, g)
+#pragma omp taskloop simd private(e, g, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp taskloop simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
@@ -188,7 +188,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S6<float> s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6<float>::S6' requested here}}
   S7<S6<float> > s7(0.0) , s7_0(1.0);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}}
   for (int k = 0; k < argc; ++k)
@@ -208,7 +208,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
   for (int k = 0; k < argc; ++k)
     ++k;
-#pragma omp taskloop simd private(argc)
+#pragma omp taskloop simd private(argc, z)
   for (int k = 0; k < argc; ++k)
     ++k;
 #pragma omp taskloop simd private(S1) // expected-error {{'S1' does not refer to a value}}
index dc3a389fc0dfc16443782e9159d5f356631c4301..7ac4c2488cfb7d7ede62811b57ba14aebfcb2b1d 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized
 
 typedef void **omp_allocator_handle_t;
 extern const omp_allocator_handle_t omp_default_mem_alloc;
@@ -104,7 +104,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                        // expected-note 4 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];         // expected-note 2 {{'r' defined here}}
@@ -161,7 +161,7 @@ T tmain(T argc) {
 #pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}}
+#pragma omp taskloop simd reduction(* : z, ca) // expected-error {{const-qualified variable cannot be reduction}}
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}}
@@ -226,7 +226,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                      // expected-note 2 {{'j' defined here}}
   S3 &p = k;                       // expected-note 2 {{'p' defined here}}
   const int &r = da[i];            // expected-note {{'r' defined here}}
@@ -265,7 +265,7 @@ int main(int argc, char **argv) {
 #pragma omp taskloop simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int i = 0; i < 10; ++i)
     foo();
-#pragma omp taskloop simd reduction(&& : argc)
+#pragma omp taskloop simd reduction(&& : argc, z)
   for (int i = 0; i < 10; ++i)
     foo();
 #pragma omp taskloop simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index b926689c3b172bab2af9f013e6f47badac34fa01..8af6dd02cc391892060e31729d0788961dcd46f7 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 75d9a1d360bdd942e0d80f2b40425f0c921be180..59e4b8b8f0053eddd276e318c849a2d39614c365 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
   // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
   // expected-error@+2 2 {{expression is not an integral constant expression}}
   // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
-  #pragma omp taskloop simd simdlen (argc 
+  #pragma omp taskloop simd simdlen (argc
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
   // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
   #pragma omp taskloop simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
index ed7c53b070d49675a42d7788e96424d1200e090b..793fb978b5b43943a2cc03e80c62747b04b106d5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 template <class T>
 T tmain(T argc) {
index cb66ccddf300c8d6bde6d5c5f8dd12c6d9b88876..d86f1b750c4d7f65470f108f605ce02fbaddff29 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 template <class T>
 T tmain(T argc) {
index 28a5e2902c6fe9bf1efe847afff491c05739d621..a0250504060003f560fe4ed67697d2099125bf0b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized
 
 void foo();
 
index d95109c3dc3cc0bb0865cd788d4665507042db3b..35a2d1708576b5c754a4180c13f5e9ac872ebef4 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
 
 void foo() {
 }
index 9ebce9aea0500c77a62119943bb6eed0ec6863ee..7f000208303b7d3fac2cc8f67d3622e058a18778 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index a86a87a9ef5172cbe5d22d6f3aaf433eb2768c5b..22d2408d3f1784d0efbd4ba198b8d69991cac3c6 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target
 #pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1<<z) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
index b1f60f1ecb316dffde6919217f9d18ce6309a239..63237e12c96501e35c09908e98daa9f235192f1f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute firstprivate(ba)
+#pragma omp teams distribute firstprivate(ba, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index 35231edbe8cd4e743b4fdbf47a46883b9f5b0068..f17f7bb5e7d7edd4cb82f44bd02e3b38ee90e943 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index a96d86d7d6af385855690ebb66f444726d648d37..824a51bf0961b4b7514ebcce875d9fc8e7a6c620 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 103a6d26fd4cc22aab807fca916f5616c9c28eeb..5156439e67755dc0703677813ef98774c065962d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute num_teams(C)
   for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 #pragma omp target
-#pragma omp teams distribute num_teams(argc + argc)
+#pragma omp teams distribute num_teams(argc + argc + z)
   for (int i=0; i<100; i++) foo();
 #pragma omp target
 #pragma omp teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
-#pragma omp teams distribute num_teams (argc + argc)
+#pragma omp teams distribute num_teams (argc + argc + z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
index 1171807fdb9ddd4b977e3ff381840b15c76100b8..0c8a2e6108d6aa4dc690b66412cb77f4c3590a23 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
 
 void foo() {
 }
index 2664b9df95343580dad2aa07fa76fb8c39911e82..1c18f855907795ed8fc7b0bc72033c0a2287b0bf 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
index efc139d84ad18c629fcae1cde9becea2802360ed..2c46623985070df100f244a294cc07bbf151034d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index e0abe1114fb1ba04c049d01c65135b5af352b105..27ff4125daf7f7be05d5dc59591cbd92f8d695b3 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target
 #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
index 922658e6dd8df96998d008d6072362a7ff58993f..b6fac35b765f5f11011237fdf4237c57ffa1f711 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target
@@ -116,7 +116,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for firstprivate(da)
+#pragma omp teams distribute parallel for firstprivate(da, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index e92dc65c60a86cb9efbd16d09ecdbd264ba04deb..6f724b050178a684f1650d153df995b6be691dcc 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target
 #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
@@ -45,7 +45,7 @@ int tmain(T argc, S **argv) {
 #pragma omp teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for if(argc)
+#pragma omp teams distribute parallel for if(argc+z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -76,7 +76,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
@@ -123,7 +123,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for if(parallel : argc)
+#pragma omp teams distribute parallel for if(parallel : argc + z)
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp teams distribute parallel for'}}
index 22d8e6ad71bddb08fd5f37a20becb5d5a51b3add..56f4bc0260edd40930d86db5d6b3eee399df89bd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 42dc92e3cecae5b619e144d82bf70b40754d9b8b..2e1be8f9f6f6777a78dd9bc466a17c01c9ca5a4c 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index b86178384201e5caad75ac3470d7a9e4c4bc99cf..906c330428669cac8776a55bb7e5a9fa33a823fd 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index cc6f1c8e64056c64e20339decb3a7268f4cb9b57..2f34c8b60faf1d0f509e7cb2febb44c96b5a3b75 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute parallel for num_teams(C)
   for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for num_teams(argc + argc)
+#pragma omp teams distribute parallel for num_teams(argc + argc + z)
   for (int i=0; i<100; i++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for num_teams (argc + argc)
+#pragma omp teams distribute parallel for num_teams (argc + argc - z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
index 5b22861f8eddf91ef263c922cb91268892856264..9b24c3099cbd96961c157cf6bf2ae5e3a7d6e18b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 33e9c39be900781845247176422427fddffd6a6d..56d5c45e898cb1b68ad0f131e73873d5856c100b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index cc7a4c668bf07f3f5bc33b1fa111383fa9f984db..beebe84e6df039e35b013c9d8c8ac5323c0dcaf1 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams distribute parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -261,7 +261,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
+#pragma omp teams distribute parallel for reduction(^ : z, fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
index e8cda672c0961c284b5bfc8f784afaedeab6bd32..8c8fa77ea02c9a4a08cfb2f4911c6eed6052a6f6 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N, int ST> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
+  T k;
 // expected-error@+2 {{expected '(' after 'schedule'}}
 #pragma omp target
 #pragma omp teams distribute parallel for schedule
@@ -85,7 +86,7 @@ T tmain(T argc, S **argv) {
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 #pragma omp target
-#pragma omp teams distribute parallel for schedule (dynamic, 1)
+#pragma omp teams distribute parallel for schedule (dynamic, k)
   for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
 
 // expected-error@+2 {{argument to 'schedule' clause must be a strictly positive integer value}}
index 90edfb1b11f0f7f1c39cd9ef1017af73d4a5858d..faa2b200e6d8647f51acb0b5781eee2e2d303337 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index a8f14cb61f2c21b8c6228e48dbef377b17fcd561..206540af6e219913b3c0a3fb64c4a4c10c239900 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index 31611c7ff01522f0dc520b6affeb27ceb09b5c1c..032ab9c4495bc60304adbf9de38d7649006c2816 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
 
 void foo() {
 }
index 4de844737a46bd7c904ef31b275e8309a8417b62..93017a8233ffe43fde89544b603e27af076788df 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index d53fa578b5c576fe63a7716935e4ba9eb2814414..cbd4ec4ce9793fabf7c2eefb0ae671588748c8ff 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target
 #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1*z) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z>>1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
index 182c21423a7e4362b31bf8401786ccc2754b2a4f..87098ca45a6061844f58edbd310274e92413b8ce 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, z;
   int &j = i;
 
 #pragma omp target
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd firstprivate(ba)
+#pragma omp teams distribute parallel for simd firstprivate(ba, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index d8a642300d71f11c7dffcbea75a1bf6f1af2f3d6..c01e6e87e39a540c0ae9ef4069e776bd077e7b42 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, class S> // expected-note {{declared here}}
 int tmain(T argc, S **argv) {
-  T i;
+  T i, z;
 #pragma omp target
 #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
@@ -33,7 +33,7 @@ int tmain(T argc, S **argv) {
 #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}}
+#pragma omp teams distribute parallel for simd if (foobool(argc)*z), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd if (S) // expected-error {{'S' does not refer to a value}}
@@ -76,7 +76,7 @@ int tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, z;
 #pragma omp target
 #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}}
   for (i = 0; i < argc; ++i) foo();
@@ -90,7 +90,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd if (argc/z)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2])
index d0f6775c5710db1f75b80fb92fb833eaf4bfde47..fe70da5b41954b74841806edd888b9971b92651f 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp teams distribute parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd lastprivate(argc)
+#pragma omp teams distribute parallel for simd lastprivate(argc, z)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index 44e42c624df6b7da733896223272850bd0446406..f79a9986d2087e9b45a9f4aade803815325555eb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
index a1c928073697babd1352af6145a36a81beb4b373..2fae965da80bc7d363f3d120d917a98b7292029b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index e95ddfc66900af91229579af1b7835fc1315295b..c07cef186103e3f2b303648cf5987befd4e2c024 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 5e4ce0c864719259eca04c16ed5c25df33d3525f..c18890ff90c274b8de81acac9924ab009052fc45 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T k;
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_teams(C)
   for (int i=0; i<100; i++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int i=0; i<100; i++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd num_teams(argc + argc)
+#pragma omp teams distribute parallel for simd num_teams(argc + k)
   for (int i=0; i<100; i++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int k;
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd num_teams (argc + argc)
+#pragma omp teams distribute parallel for simd num_teams (argc + k)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
index 1f9b61e4643760315b1e3b83a502e0b0fe7ee156..6ff5db319a98542b24aaaa052aed63bc635a25d2 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized
 
 void foo() {
 }
@@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}}
 
 template <class T, typename S, int N> // expected-note {{declared here}}
 T tmain(T argc, S **argv) {
-  T i;
+  T i, k;
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
@@ -27,7 +27,7 @@ T tmain(T argc, S **argv) {
 #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
@@ -52,7 +52,7 @@ T tmain(T argc, S **argv) {
 }
 
 int main(int argc, char **argv) {
-  int i;
+  int i, k;
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}}
   for (i = 0; i < argc; ++i) foo();
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
+#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}}
   for (i = 0; i < argc; ++i) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
index 9d4ca03f9e4ebe73e870c0b59bc5205103b81fb8..689d6c8151a5e9a1a1158349ae6a143b8a71e371 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -34,7 +34,7 @@ class S4 {
 public:
   S4(int v):a(v) { }
 };
-class S5 { 
+class S5 {
   int a;
   S5():a(0) {} // expected-note {{implicitly declared private here}}
 public:
index 459f40f494c2da4a18246534d060f72798d16d70..c61c0984b506c525faaf7fb621cd70da6fb74f64 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo();
 
index 82854a7cb6893b9bc0c2e48bc5355d0c17cfae5c..feb31286b85905f8132cbc1b253b403a0c814046 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -126,7 +126,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd reduction(&& : argc)
+#pragma omp teams distribute parallel for simd reduction(&& : argc, z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index 2b31c89634886f1d0bb02406b97777a84dc4647e..3e455d29348eee830140a4cafe8696f4be4306e3 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 90f3cf46b90d44cec4d5ac6c9d1981e1af8a11eb..2eefa1ee198ebea8dafc05908025fa9511b79c0a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index 2b31c89634886f1d0bb02406b97777a84dc4647e..3e455d29348eee830140a4cafe8696f4be4306e3 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b5a95760eb0dc28d54748a1d70b3f9512b561cf5..6d0cfaa78003af301cf6d3a7cc5a1712380765ef 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute parallel for simd thread_limit(C)
   for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for simd thread_limit(argc + argc)
+#pragma omp teams distribute parallel for simd thread_limit(argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for simd thread_limit (argc + argc)
+#pragma omp teams distribute parallel for simd thread_limit (argc + z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
index ad37b5389c630c915956a22b0181a65adbc2206f..85aa33a7b62d915023c3bf5854c83486843fbeee 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute parallel for thread_limit(C)
   for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute parallel for thread_limit(argc + argc)
+#pragma omp teams distribute parallel for thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
-#pragma omp teams distribute parallel for thread_limit (argc + argc)
+#pragma omp teams distribute parallel for thread_limit (argc + argc + z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
index 130cbd5c57c15d234f12824d1206ab71e9b2355a..8654bbf3b6b914fe8aad2de4bd50e72681fa9a4e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index 6b209c7797e7db5bef23b9be42a7c0019301b71c..9e1ed32fc31ffb49d59dd78575bee7f2c00cd1b5 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -135,7 +135,7 @@ T tmain(T argc) {
 #pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+#pragma omp teams distribute reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
@@ -203,7 +203,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -303,7 +303,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute reduction(+ : fl)
+#pragma omp teams distribute reduction(+ : fl, z)
     for (int j=0; j<100; j++) foo();
   static int m;
 #pragma omp target
index b1828eb43c42b0ca14b1e8026b044a5a50ddb22d..452d017b5d1b915a542d5fdf7a07807f373d9bf0 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
index f745aaad7fd10446c452cb69e792e87f2154f8e0..955a2b5a8241d92a80881bf674d50ddc4182bdb1 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized
 
 struct B {
   static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
index a5eb6d20e02bba471308e95bd5359fee1a60d7d3..75c7c619022c75de7841b1e033a936baa55f0b06 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 8f6db01efb3aaaa15b242f6499470238c63d60cf..2775210ae048f339d4fc9cc3a4bb6c3db72e334d 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo();
 
index 3eb0db923b81ed33f846a3cd4ca4cdbcde6d9d22..424797576837f40dcea5bd2411a8f16f8eedf2cb 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 void foo() {
 }
@@ -16,7 +16,7 @@ T tmain(T argc) {
   T b = argc, c, d, e, f, g;
   char ** argv;
   static T a;
-// CHECK: static T a;
+  T z;
 
 #pragma omp target
 #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
@@ -47,7 +47,7 @@ T tmain(T argc) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
@@ -62,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}}
   for (int i = 0; i < 10; ++i) foo();
@@ -91,7 +92,7 @@ int main(int argc, char **argv) {
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
+#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}}
   for (int i = 0; i < 10; ++i) foo();
 
 #pragma omp target
index 8ea499f2f8c7418a39a045eb49a054386d031f90..f9818964aeba972b2fd2f26daffe93a4975147df 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -64,7 +64,7 @@ int main(int argc, char **argv) {
   S4 e(4);
   S5 g(5);
   S6 p;
-  int i;
+  int i, k;
   int &j = i;
 
 #pragma omp target
@@ -100,7 +100,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}}
+#pragma omp teams distribute simd firstprivate (k, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}}
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index 3a7f0d2f4cf310a5176a543041cb4b5d40a2dc74..bad64fac08d8493f51a9ce0cc6633999924ba111 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -69,7 +69,7 @@ template <class I, class C>
 int foomain(int argc, char **argv) {
   I e(4);
   I g(5);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp target
 #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -104,7 +104,7 @@ int foomain(int argc, char **argv) {
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
-#pragma omp teams distribute simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+#pragma omp teams distribute simd lastprivate(k, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
   for (int k = 0; k < argc; ++k) ++k;
 
 #pragma omp target
@@ -159,7 +159,7 @@ int main(int argc, char **argv) {
   S5 g(5);
   S3 m;
   S6 n(2);
-  int i;
+  int i, k;
   int &j = i;
 #pragma omp target
 #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
@@ -206,7 +206,7 @@ int main(int argc, char **argv) {
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd lastprivate(ba)
+#pragma omp teams distribute simd lastprivate(ba, k)
   for (i = 0; i < argc; ++i) foo();
 
 #pragma omp target
index 91b358f5ceb3a1bd33a751f97eefc2e8882d90f9..601d4ddf25b3c71c36e85f6ca29f235e631aa64e 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 namespace X {
index 777f0812ce43adbb5306960a1a8a00dad5895e81..c463560a46b41db4f28d773b5595b5034c720442 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized
 
 class S {
   int a;
index 7a99e3f352fcb66d1db35ef4067f150cc0c45153..faaf16a23da86bd9db90b1244bdfb787bada9fc6 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 86164642b82fec0e2df1deb2fc716651bf56ebf0..25ef0f32ddab666daaba803b845aa614437c3277 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute simd num_teams(C)
   for (int i=0; i<100; i++) foo();
@@ -42,7 +43,7 @@ T tmain(T argc) {
 #pragma omp teams distribute simd num_teams(argc + argc)
   for (int i=0; i<100; i++) foo();
 #pragma omp target
-#pragma omp teams distribute simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}}
+#pragma omp teams distribute simd num_teams(argc + z), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}}
   for (int i=0; i<100; i++) foo();
 #pragma omp target
 #pragma omp teams distribute simd num_teams(S1) // expected-error {{'S1' does not refer to a value}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}}
   for (int i=0; i<100; i++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd num_teams (argc + argc)
+#pragma omp teams distribute simd num_teams (argc + argc + z)
   for (int i=0; i<100; i++) foo();
 
 #pragma omp target
index 7ffdf86e3c52d5092211a6b4e43c0ac61df1c8be..88a6848e4313232d158d66067cd4e65eb2ea92f5 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -34,7 +34,7 @@ class S4 {
 public:
   S4(int v):a(v) { }
 };
-class S5 { 
+class S5 {
   int a;
   S5():a(0) {} // expected-note {{implicitly declared private here}}
 public:
index 826de052197210d3453708d8b391fe0f2f1b8712..56935ed8ac96be209a7a1188cb3c191394f231ec 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -80,7 +80,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -156,7 +156,7 @@ T tmain(T argc) {
 #pragma omp teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
+#pragma omp teams distribute simd reduction(+ : z, o) // expected-error 2 {{no viable overloaded '='}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -237,7 +237,7 @@ int main(int argc, char **argv) {
 #pragma omp teams distribute simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute simd reduction(&& : argc)
+#pragma omp teams distribute simd reduction(&& : argc, z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
index a3ea61e1da1a5e7f8b63e6945e4df7a0b0180888..0a2ccf3da8e0386f32fd4a761c8595b4c211bec3 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index b29e2bb8557e3c6397dd4129e64fdc61823adb4e..81f7e2a66368adefaac20df1e48969ad5954128a 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp target
   #pragma omp teams distribute simd shared // expected-error {{expected '(' after 'shared'}}
@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
   #pragma omp teams distribute simd shared(da)
   for (int j=0; j<100; j++) foo();
   #pragma omp target
-  #pragma omp teams distribute simd shared(e, g)
+  #pragma omp teams distribute simd shared(e, g, z)
   for (int j=0; j<100; j++) foo();
   #pragma omp target
   #pragma omp teams distribute simd shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}}
index a3ea61e1da1a5e7f8b63e6945e4df7a0b0180888..0a2ccf3da8e0386f32fd4a761c8595b4c211bec3 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
index 732bb34473554139787c7385a96291a5d919331b..e2b30ef2e8f141f9f9d507a410da70be0b5935ca 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute simd thread_limit(C)
   for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute simd thread_limit(argc + argc)
+#pragma omp teams distribute simd thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
-#pragma omp teams distribute simd thread_limit (argc + argc)
+#pragma omp teams distribute simd thread_limit (argc + argc + z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
index d22cc25b5b59d734052903348d873bc20297c8af..14ccbc29d8b42d4a8d3c765fe2cd948861b8c1aa 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams distribute thread_limit(C)
   for (int j=0; j<100; j++) foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams distribute thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   for (int j=0; j<100; j++) foo();
 #pragma omp target
-#pragma omp teams distribute thread_limit(argc + argc)
+#pragma omp teams distribute thread_limit(argc + argc + z)
   for (int j=0; j<100; j++) foo();
 #pragma omp target
 #pragma omp teams distribute thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams distribute thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   for (int j=0; j<100; j++) foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
-#pragma omp teams distribute thread_limit (argc + argc)
+#pragma omp teams distribute thread_limit (argc + argc + z)
   for (int j=0; j<100; j++) foo();
 
 #pragma omp target
index 9bc5eeac6e3481b2c4e8e3a30d26352a32ecf24a..ff58f42994d6ebbfdd44b605ae91a482d1b8da6b 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
   const int da[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
 #pragma omp target
 #pragma omp teams firstprivate // expected-error {{expected '(' after 'firstprivate'}}
@@ -98,7 +98,7 @@ int main(int argc, char **argv) {
 #pragma omp teams firstprivate(argv[1]) // expected-error {{expected variable name}}
   foo();
 #pragma omp target
-#pragma omp teams firstprivate(ba)
+#pragma omp teams firstprivate(ba, z)
   foo();
 #pragma omp target
 #pragma omp teams firstprivate(ca)
index bba7da2e0e3257fbb108bd8ec05308b8b1104a66..b01c428118ca897a761364d7809c6bd986a49917 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized
 
 void foo() {
 }
index 47b2b4eafe34234a839fc0115eef686f1dbf2183..40da396b010695ff9f1db865ac3383fbc9864736 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams num_teams(C)
   foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
 #pragma omp target
-#pragma omp teams num_teams(argc + argc)
+#pragma omp teams num_teams(argc + argc+z)
   foo();
 #pragma omp target
 #pragma omp teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'num_teams' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams num_teams // expected-error {{expected '(' after 'num_teams'}}
   foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   foo();
 
 #pragma omp target
-#pragma omp teams num_teams (argc + argc)
+#pragma omp teams num_teams (argc + argc-z)
   foo();
 
 #pragma omp target
index 5cc8a7a8051a67275f56f08e1e7478122997d489..faabbb3aa144b81ecd736a30922ad2fa09339795 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s
+// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
index d9219cfbbbd363b1fd33fc5001ded5b4938a34aa..73cce700deae5d10a3e6ae368d03cde8eb442b58 100644 (file)
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized
 
 extern int omp_default_mem_alloc;
 void foo() {
@@ -86,7 +86,7 @@ T tmain(T argc) {
   const T d = T();       // expected-note 4 {{'d' defined here}}
   const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
   T qa[5] = {T()};
-  T i;
+  T i, z;
   T &j = i;                    // expected-note 4 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const T &r = da[(int)i];     // expected-note 2 {{'r' defined here}}
@@ -132,7 +132,7 @@ T tmain(T argc) {
 #pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}}
   foo();
 #pragma omp target
-#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
+#pragma omp teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
   foo();
 #pragma omp target
 #pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
@@ -216,7 +216,7 @@ int main(int argc, char **argv) {
   int qa[5] = {0};
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;                  // expected-note 2 {{'j' defined here}}
   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
   const int &r = da[i];        // expected-note {{'r' defined here}}
@@ -295,7 +295,7 @@ int main(int argc, char **argv) {
 #pragma omp teams reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
   foo();
 #pragma omp target
-#pragma omp teams reduction(+ : o) // expected-error {{no viable overloaded '='}}
+#pragma omp teams reduction(+ : z, o) // expected-error {{no viable overloaded '='}}
   foo();
 #pragma omp target
 #pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
index a83b82f37f33b849a219e6cad74acdd66df42ed5..aa7964fbd2aade9500d798c9d964912ff70cd569 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target
+// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized
 
 void foo() {
 }
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
   const int da[5] = { 0 };
   S4 e(4);
   S5 g(5);
-  int i;
+  int i, z;
   int &j = i;
   #pragma omp target
   #pragma omp teams shared // expected-error {{expected '(' after 'shared'}}
@@ -101,7 +101,7 @@ int main(int argc, char **argv) {
   #pragma omp teams shared(da)
   foo();
   #pragma omp target
-  #pragma omp teams shared(e, g)
+  #pragma omp teams shared(e, g, z)
   foo();
   #pragma omp target
   #pragma omp teams shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}}
index 0c5a22cf3031c1846fab92070a9eacf06e62b736..cc42c97ad8ac3deae2a2a8627d3906e20bdfcb34 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
-// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized
 
 void foo() {
 }
@@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}}
 template <typename T, int C> // expected-note {{declared here}}
 T tmain(T argc) {
   char **a;
+  T z;
 #pragma omp target
 #pragma omp teams thread_limit(C)
   foo();
@@ -39,7 +40,7 @@ T tmain(T argc) {
 #pragma omp teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
   foo();
 #pragma omp target
-#pragma omp teams thread_limit(argc + argc)
+#pragma omp teams thread_limit(argc + argc + z)
   foo();
 #pragma omp target
 #pragma omp teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'thread_limit' clause}}
@@ -61,6 +62,7 @@ T tmain(T argc) {
 }
 
 int main(int argc, char **argv) {
+  int z;
 #pragma omp target
 #pragma omp teams thread_limit // expected-error {{expected '(' after 'thread_limit'}}
   foo();
@@ -86,7 +88,7 @@ int main(int argc, char **argv) {
   foo();
 
 #pragma omp target
-#pragma omp teams thread_limit (argc + argc)
+#pragma omp teams thread_limit (argc + argc - z)
   foo();
 
 #pragma omp target