Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: gcc/libgfortran/m4/minloc1.m4

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/libgfortran/m4/minloc0.m4 ('k') | gcc/libgfortran/m4/minval.m4 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/libgfortran/m4/minloc1.m4
diff --git a/gcc/libgfortran/m4/minloc1.m4 b/gcc/libgfortran/m4/minloc1.m4
index 905619a3896e659e2a4a74e9130e133fcc53ae53..6fa5e69ccc75d26842e101e03e590d1592c56a1b 100644
--- a/gcc/libgfortran/m4/minloc1.m4
+++ b/gcc/libgfortran/m4/minloc1.m4
@@ -34,24 +34,67 @@ include(ifunction.m4)dnl
`#if defined (HAVE_'atype_name`) && defined (HAVE_'rtype_name`)'
ARRAY_FUNCTION(0,
-` atype_name minval;
- minval = atype_max;
- result = 0;',
-` if (*src < minval || !result)
- {
- minval = *src;
- result = (rtype_name)n + 1;
- }')
+` atype_name minval;
+#if defined ('atype_inf`)
+ minval = atype_inf;
+#else
+ minval = atype_max;
+#endif
+ result = 1;',
+`#if defined ('atype_nan`)
+ if (*src <= minval)
+ {
+ minval = *src;
+ result = (rtype_name)n + 1;
+ break;
+ }
+ }
+ for (; n < len; n++, src += delta)
+ {
+#endif
+ if (*src < minval)
+ {
+ minval = *src;
+ result = (rtype_name)n + 1;
+ }')
MASKED_ARRAY_FUNCTION(0,
-` atype_name minval;
- minval = atype_max;
- result = 0;',
-` if (*msrc && (*src < minval || !result))
- {
- minval = *src;
- result = (rtype_name)n + 1;
- }')
+` atype_name minval;
+#if defined ('atype_inf`)
+ minval = atype_inf;
+#else
+ minval = atype_max;
+#endif
+#if defined ('atype_nan`)
+ rtype_name result2 = 0;
+#endif
+ result = 0;',
+` if (*msrc)
+ {
+#if defined ('atype_nan`)
+ if (!result2)
+ result2 = (rtype_name)n + 1;
+ if (*src <= minval)
+#endif
+ {
+ minval = *src;
+ result = (rtype_name)n + 1;
+ break;
+ }
+ }
+ }
+#if defined ('atype_nan`)
+ if (unlikely (n >= len))
+ result = result2;
+ else
+#endif
+ for (; n < len; n++, src += delta, msrc += mdelta)
+ {
+ if (*msrc && *src < minval)
+ {
+ minval = *src;
+ result = (rtype_name)n + 1;
+ }')
SCALAR_ARRAY_FUNCTION(0)
« no previous file with comments | « gcc/libgfortran/m4/minloc0.m4 ('k') | gcc/libgfortran/m4/minval.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698