1 /* { dg-do compile } */ 2 /* { dg-options "-O2" } */ 3 /* This test used to trigger the use of an uninitialised field (t_icode) 4 in the secondary_reload_info structure created in ira-costs.c:copy_cost(). 5 Unfortunately the test only generates a problem if run under valgrind... */ 6 typedef unsigned long int uint64_t; 7 8 namespace __gnu_parallel 9 { 10 enum _AlgorithmStrategy { heuristic, force_sequential, force_parallel }; 11 enum _SortAlgorithm { MWMS, QS, QS_BALANCED }; 12 enum _MultiwayMergeAlgorithm { LOSER_TREE }; 13 enum _PartialSumAlgorithm { RECURSIVE, LINEAR }; 14 enum _SplittingAlgorithm { SAMPLING, EXACT }; 15 enum _FindAlgorithm { GROWING_BLOCKS, CONSTANT_SIZE_BLOCKS, EQUAL_SPLIT }; 16 typedef uint64_t _SequenceIndex; 17 struct _Settings 18 { 19 _AlgorithmStrategy algorithm_strategy; 20 _SortAlgorithm sort_algorithm; 21 _PartialSumAlgorithm partial_sum_algorithm; 22 _MultiwayMergeAlgorithm multiway_merge_algorithm; 23 _FindAlgorithm find_algorithm; 24 _SplittingAlgorithm sort_splitting; 25 _SplittingAlgorithm merge_splitting; 26 _SplittingAlgorithm multiway_merge_splitting; 27 _SequenceIndex accumulate_minimal_n; 28 unsigned int adjacent_difference_minimal_n; 29 _SequenceIndex count_minimal_n; 30 _SequenceIndex fill_minimal_n; 31 double find_increasing_factor; 32 _SequenceIndex find_initial_block_size; 33 _SequenceIndex find_maximum_block_size; 34 _SequenceIndex find_sequential_search_size; 35 _SequenceIndex for_each_minimal_n; 36 _SequenceIndex generate_minimal_n; 37 _SequenceIndex max_element_minimal_n; 38 _SequenceIndex merge_minimal_n; 39 unsigned int merge_oversampling; 40 _SequenceIndex min_element_minimal_n; 41 _SequenceIndex multiway_merge_minimal_n; 42 int multiway_merge_minimal_k; 43 unsigned int multiway_merge_oversampling; 44 _SequenceIndex nth_element_minimal_n; 45 _SequenceIndex partition_chunk_size; 46 double partition_chunk_share; 47 _SequenceIndex partition_minimal_n; 48 _SequenceIndex partial_sort_minimal_n; 49 float partial_sum_dilation; 50 unsigned int partial_sum_minimal_n; 51 float find_scale_factor; 52 _Settings_Settings53 explicit _Settings() : 54 algorithm_strategy(heuristic), 55 sort_algorithm(MWMS), 56 partial_sum_algorithm(LINEAR), 57 multiway_merge_algorithm(LOSER_TREE), 58 find_algorithm(CONSTANT_SIZE_BLOCKS), 59 sort_splitting(EXACT), 60 merge_splitting(EXACT), 61 multiway_merge_splitting(EXACT), 62 accumulate_minimal_n(1000), 63 adjacent_difference_minimal_n(1000), 64 count_minimal_n(1000), 65 fill_minimal_n(1000), 66 find_increasing_factor(2.0), 67 find_initial_block_size(256), 68 find_maximum_block_size(8192), 69 find_sequential_search_size(256), 70 for_each_minimal_n(1000), 71 generate_minimal_n(1000), 72 max_element_minimal_n(1000), 73 merge_minimal_n(1000), 74 merge_oversampling(10), 75 min_element_minimal_n(1000), 76 multiway_merge_minimal_n(1000), 77 multiway_merge_minimal_k(2), 78 multiway_merge_oversampling(10), 79 nth_element_minimal_n(1000), 80 partition_chunk_size(1000), 81 partition_chunk_share(0.0), 82 partition_minimal_n(1000), 83 partial_sort_minimal_n(1000), 84 partial_sum_dilation(1.0f), 85 partial_sum_minimal_n(1000), 86 find_scale_factor(0.01f) 87 { } 88 }; 89 } 90 91 namespace 92 { 93 __gnu_parallel::_Settings s; 94 } 95 96