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

            Bug ID: 63404
           Summary: gcc 5 miscompiles linux block layer
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andi-gcc at firstfloor dot org

When I boot a current Linux mainline kernel compiled with mainline gcc 
and the section fix patch applied I always get a crash at boot in the block
layer.

gcc version 5.0.0 20140926 (experimental) (GCC) 

    1.318801] EXT4-fs (sda1): write access will be enabled during recovery
[    1.367592] ------------[ cut here ]------------
[    1.369061] kernel BUG at /home/andi/lsrc/linux/block/blk-flush2.c:80!
[    1.370910] invalid opcode: 0000 [#1] SMP 


I narrowed it down to one function. When only the function is compiled with gcc
4.9 the kernel boots.

Attach is a test case with only the function.
It doesn't quite run by itself yet, so the code has to be examined.

Reply via email to