From: Wolfgang Bangerth Date: Tue, 9 Oct 2007 21:51:06 +0000 (-0600) Subject: PR libstdc++/33485 continued. X-Git-Tag: releases/gcc-4.3.0~2134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c891154fad7db61b15121ca9b80efcf95d0ff291;p=thirdparty%2Fgcc.git PR libstdc++/33485 continued. 2007-10-09 Wolfgang Bangerth PR libstdc++/33485 continued. * include/parallel/multiway_mergesort.h: Use __builtin_alloca. From-SVN: r129182 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a36232fbcbd8..7b96f32b9adc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2007-10-09 Wolfgang Bangerth + + PR libstdc++/33485 continued. + * include/parallel/multiway_mergesort.h: Use __builtin_alloca. + 2007-10-09 Zhou Drangon PR libstdc++/33682 diff --git a/libstdc++-v3/include/parallel/multiway_mergesort.h b/libstdc++-v3/include/parallel/multiway_mergesort.h index 9cc04052f5ef..c1a07dc03528 100644 --- a/libstdc++-v3/include/parallel/multiway_mergesort.h +++ b/libstdc++-v3/include/parallel/multiway_mergesort.h @@ -139,7 +139,8 @@ namespace __gnu_parallel num_samples = Settings::sort_mwms_oversampling * d->num_threads - 1; - difference_type es[num_samples + 2]; + difference_type* es = static_cast(__builtin_alloca(sizeof(difference_type) * (num_samples + 2))); + equally_split(sd->starts[d->iam + 1] - sd->starts[d->iam], num_samples + 1, es); for (difference_type i = 0; i < num_samples; i++)