https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490

--- Comment #9 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
> And, what do you find wrong on the alignment?

In the case of the artificially zero terminated strings,
the .zero is now wrong, and they can actually screw up the
necessary alignment.


Maybe the easiest way out would be simply not try to put
non-zero terminated strings in merge sections, when the
-fsection-anchors is in effect?

--- varasm.c.orig       2019-01-25 17:57:32.000000000 +0100
+++ varasm.c    2019-02-26 09:48:48.061315685 +0100
@@ -838,7 +838,8 @@
              if (j == unit)
                break;
            }
-         if (i == len - unit || (unit == 1 && i == len))
+         if (i == len - unit || (unit == 1 && i == len &&
+                                 !flag_section_anchors))
            {
              sprintf (name, "%s.str%d.%d", prefix,
                       modesize / 8, (int) (align / 8));

Reply via email to