This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] PR48344: Fix unrecognizable insn error when gcc



This patch has bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this ok for the trunk?

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48344 for the original problem report. The error resulted because gcc's processing of command-line options within gcc initialization code originally preceded the processing of target-specific configuration hooks.

In the unpatched gcc implementation, the Pmode (pointer mode) variable has not been initialized at the time the -fstack-limit-register command-line option is processed. As a consequence, the stack-limiting register is not assigned a proper mode. Thus, rtl instructions that make use of this stack-limiting register have an unspecified mode, and are therefore not matched by any known instructions.

The fix represented in this patch is to move the invocation of process_options () from within the implementation of do_compile () to immediately preceding the invocation of handle_common_deferred_options () (inside toplev::main ()).

gcc/ChangeLog:

2016-01-14  Kelvin Nilsen <kelvin@gcc.gnu.org>

    * toplev.c (do_compile): remove invocation of process_options ()
        from within do_compile ()
    (toplev::main): insert invocation of process_options () before
        invocation of handle_common_deferred_options ().

gcc/testsuite/ChangeLog:

2016-01-14  Kelvin Nilsen <kelvin@gcc.gnu.org>

    * gcc.target/powerpc/pr48344-1.c: New test.

Attachment: svn.diffs.1-20-2016
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]