From 022c0cd11d277b3e6b76c060f7f8d3f1dc675127 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sat, 26 Nov 2011 16:06:16 -0800 Subject: [PATCH] Fix init_sync_libfuncs_1 iteration. * optabs.c (init_sync_libfuncs_1): Include max in iteration. From-SVN: r181749 --- gcc/ChangeLog | 2 ++ gcc/optabs.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d304c89026..41b3b9b4d40 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,7 @@ 2011-11-26 Richard Henderson + * optabs.c (init_sync_libfuncs_1): Include max in iteration. + * omp-low.c (expand_omp_atomic): Assume anything aligned to BIGGEST_ALIGNMENT is aligned. diff --git a/gcc/optabs.c b/gcc/optabs.c index 1aafd28b5be..0ce21e9b548 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -6606,7 +6606,7 @@ init_sync_libfuncs_1 (optab tab, const char *base, int max) buf[len + 2] = '\0'; mode = QImode; - for (i = 1; i < max; i *= 2) + for (i = 1; i <= max; i *= 2) { buf[len + 1] = '0' + i; set_optab_libfunc (tab, mode, buf);