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

            Bug ID: 81244
           Summary: Odd things happening with always_inline on 32bit
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tarceri at itsqueeze dot com
  Target Milestone: ---

Problem:

When running an OpenGL regression test against a recent change in Mesa git
which uses always_inline, we are getting odd results. 64bit builds seem to be
working fine, it's just 32bit with a problem.

gcc 6.3.1 and gcc 7.1 have both been confirmed to have the same issue.

If I remove always_inline the problem goes away.

Code:

always_inline was added in this commit [1], but it wasn't until a second user
of the inlined function was added that the problem began [2]. 

[1]
https://cgit.freedesktop.org/mesa/mesa/commit/?id=ca5f1e82de7e43eecb00843597688801809cc22e
[2]
https://cgit.freedesktop.org/mesa/mesa/commit/?id=bc0af44a5ae9a6671cc6c2f5a380d86fd7babacb

Reproducing:

I've only tested the issue on Intel gpu's so far, but likely exists on all
drivers. It should be reproducible on Sandy Bridge and later. 

1. Build the a 32 versions of piglit [1] and mesa [2] from git.
2. Set LD_LIBRARY_PATH to the new Mesa libs and run the following tests from
the piglit git directory.

  ./bin/shader_runner
tests/spec/arb_shader_bit_encoding/execution/and-clamp.shader_test -auto -fbo

If you have any questions about this please ask for help on the #dri-devel or
#intel-gfx freenode channels. My nick is tarceri but there should be someone
who can help if I'm not around.

[1] git://anongit.freedesktop.org/piglit
[2] git://anongit.freedesktop.org/mesa/mesa

Reply via email to