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

--- Comment #32 from Iain Sandoe <iains at gcc dot gnu.org> ---
Author: iains
Date: Sun Dec 11 16:10:48 2016
New Revision: 243525

URL: https://gcc.gnu.org/viewcvs?rev=243525&root=gcc&view=rev
Log:
[Darwin] Back-port fix for PR57438.

gcc/

2016-12-11  Iain Sandoe  <i...@codesourcery.com>

        Backport from mainline
        2016-11-27  Iain Sandoe  <i...@codesourcery.com>

        PR target/57438
        * config/i386/i386.c (ix86_code_end): Note that we emitted code
        where the function might otherwise appear empty for picbase thunks.
        (ix86_output_function_epilogue): If we find a zero-sized function
        assume that reaching it is UB and trap.  If we find a trailing label
        append a nop.
        * config/rs6000/rs6000.c (rs6000_output_function_epilogue): If we
        find a zero-sized function assume that reaching it is UB and trap.
        If we find a trailing label, append a nop.

gcc/testsuite/

2016-12-11  Iain Sandoe  <i...@codesourcery.com>

        Backport from mainline
        2016-11-27  Iain Sandoe  <i...@codesourcery.com>

        PR target/57438
        * gcc.dg/pr57438-1.c: New Test.
        * gcc.dg/pr57438-2.c: New Test.


Added:
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr57438-1.c
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr57438-2.c
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/config/i386/i386.c
    branches/gcc-6-branch/gcc/config/rs6000/rs6000.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog

Reply via email to