It’s known that mksh’s testsuite exhibits problems in the infrastructure
(kernel, libraries, toolchain, compiler).

In this case, GCC’s LTO (and before that, -fwhole-program --combine) is
a repeat offender of breaking code.

If your builds exhibit this problem, you should *disable LTO for your
_entire_ operating system*. (I’ve seen this GCC version produce LTO bugs
on other distros as well, it’s wrong code generation, but LTO bugs are
not interesting to GCC developers.)

** Changed in: mksh
       Status: New => Invalid

You received this bug notification because you are a member of mksh
Mailing List, which is subscribed to mksh.
Matching subscriptions: mkshlist-to-mksh-bugmail

  FAIL ./check.t:arith-ternary-prec-1 with GCC >= 6.3 and LTO

Status in mksh:

Bug description:
  Not really sure where the issue is, whether it's mksh or gcc, but I'll
  try here first.

  Since GCC 6.3 (also present in 6.4, didn't check 7.x) I get
  reproducible failure in tests if mksh was built with LTO:

  sh ./ -c lto
  FAIL ./check.t:arith-ternary-prec-1
                Check precedence of ternary operator vs assignment
        unexpected exit status 0 (exit-code 0), expected e != 0
        unexpected stderr - wanted pattern:
                /.*:.*1 \? 20 : x\+=2.*lvalue.*\n$/
        got nothing

  If I run input from test:

          typeset -i x=2
          y=$((1 ? 20 : x+=2))

  the value of y is 22.

To manage notifications about this bug go to:

Reply via email to