public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included
@ 2013-04-19  0:46 triplesquarednine at gmail dot com
  2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: triplesquarednine at gmail dot com @ 2013-04-19  0:46 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57003

             Bug #: 57003
           Summary: gcc-4.8.0 breaks -O2 optimization with Wine(64) -
                    links/info/bisect of commits included
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: triplesquarednine@gmail.com


Hi,

myself and others have been trying to track down problems with compiling (and
using) wine64 with GCC-4.8.0. ~ Optimization level -O2 - which is usually the
default optimization level for building wine, breaks wine64. Obviously, with
gcc-4.7.2/3 -O2 works just fine. 

Here is the Wine bug report; http://bugs.winehq.org/show_bug.cgi?id=33307

Austin English (Wine-dev) ran a bisect on GCC to try to narrow down the
problems. here is his relevant post on that, regarding this bug report;

So the bad commit is:
commit c8010b803d34fa7e096747067e33c650b36ecc06
Author: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon May 14 12:08:31 2012 +0000

        * attribs.c (decl_attributes): Avoid emitting a warning if
        ATTR_FLAG_BUILT_IN.
        * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Use lowercase for rtx
        codes.  Document meaning of sets inside CALL_INSN_FUNCTION_USAGE.
        * c-family/c-common.c (DEF_ATTR_STRING): Define and undefine as
        necessary.
        * builtin-attrs.def (DEF_ATTR_FOR_STRING): Define.  Use it to
        define a string "1".
        (ATTR_RET1_NOTHROW_NONNULL_LEAF): New attr definition.
        * builtins.def (BUILT_IN_MEMCPY, BUILT_IN_MEMMOVE, BUILT_IN_MEMSET,
        BUILT_IN_STRCPY): Use it for these functions.
        * postreload.c (reload_combine): Deal with SETs inside
        CALL_INSN_FUNCTION_USAGE.
        * caller-save.c (setup_save_areas, save_call_clobbered_regs):
        Look for REG_RETURNED notes and use a cheap restore if possible.
        * ira-int.h (struct ira_allocno): New member cheap_calls_crossed_num.
        (ALLOCNO_CHEAP_CALLS_CROSSED_NUM): New macro.
        * ira-build.c (ira_create_allocno, create_cap_allocno,
        propagate_allocno_info, propagate_some_info_from_allocno,
        copy_info_to_removed_store_destination, ira_flattening): Handle it.
        * ira-lives.c (pseudo_regno_single_word_and_live_p,
        find_call_crossed_cheap_reg): New static functions.
        (process_bb_node_lives): Look for SETs in CALL_INSN_FUNCTION_USAGE,
        and set ALLOCNO_CHEAP_CALLS_CROSSED_NUM if possible.  Also make
        a REG_RETURNED note in that case.
        * ira.c (setup_reg_renumber): Change assert to allow cases where
        allocnos only cross calls for which they are cheap to restore.
        * ira-costs.c (ira_tune_allocno_costs): Compare
        ALLOCNO_CALLS_CROSSED_NUM to ALLOCNO_CHEAP_CALLS_CROSSED_NUM rather
        than 0.
        * reg-notes.def (REG_RETURNED): New note.
        * cse.c (cse_insn): Likewise.
        * sched-deps.c (sched_analyze_insn): Likewise.
        * expr.c (init_block_move_fn): Set a "fn spec" attribute.
        * calls.c (decl_return_flags): New static function.
        (expand_call): Generate a SET in CALL_INSN_FUNCTION_USAGE for
        functions that return one of their arguments.
        * lto/lto-lang.c (handle_fnspec_attribute): New static function.
        (lto_attribute_table): Add "fn spec".
        (DEF_ATTR_STRING): Define and undefine along with the other macros.
        * regcprop.c (struct kill_set_value_data): New.
        (kill_set_value): Interpret data as a pointer to such a struct.
        Do nothing if the caller wants the register to be ignored.
        (copyprop_hardreg_forward_1): Handle SETs in CALL_INSN_FUNCTION_USAGE.

    testsuite/
        * gcc.target/i386/retarg.c: New test.

    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187459
138bc75d-0d04-0410-961f-82ee72b054a4

after this commit, wine will fail to build (with default -O2 settings, gcc will
crash with an internal error). The compile itself is fixed by a later commit:
commit d73df2920c77116fd88e03cd95dd352f16511a3f
Author: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon May 21 21:37:01 2012 +0000

        PR rtl-optimization/53373
        * caller-save.c (save_call_clobbered_regs): Look into a possible
        PARALLEL manually rather than using single_set on a call insn.
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187745
138bc75d-0d04-0410-96

after this, wine will compile fine, but segfaults on launch.

A quick search on http://gcc.gnu.org/bugzilla/ doesn't show anything for that
commit. If someone else would file a bug upstream with this info, it would be
appreciated.
______

If i can provide any more info - please let me know, or even better ~ post the
the WineHQ bug report that i have linked to above ~ as Austin or possibly
another Wine-Developer may be able to help further.

thanks.

Jordan


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2014-10-09  9:06 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19  0:46 [Bug c/57003] New: gcc-4.8.0 breaks -O2 optimization with Wine(64) - links/info/bisect of commits included triplesquarednine at gmail dot com
2013-04-19  0:55 ` [Bug middle-end/57003] " pinskia at gcc dot gnu.org
2013-04-19  1:00 ` pinskia at gcc dot gnu.org
2013-04-19  8:26 ` rguenth at gcc dot gnu.org
2013-04-21 14:22 ` dank at kegel dot com
2013-04-21 18:06 ` pinskia at gcc dot gnu.org
2013-04-22 16:39 ` dank at kegel dot com
2013-04-23  9:44 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23  9:51 ` jakub at gcc dot gnu.org
2013-04-23 15:57 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23 16:00 ` jakub at gcc dot gnu.org
2013-04-23 21:33 ` kirill.k.smirnov at math dot spbu.ru
2013-04-23 22:01 ` kirill.k.smirnov at math dot spbu.ru
2013-04-24  9:25 ` bernds at gcc dot gnu.org
2013-04-24 16:06 ` kirill.k.smirnov at math dot spbu.ru
2013-04-24 16:50 ` [Bug rtl-optimization/57003] [4.8/4.9 Regression] " jakub at gcc dot gnu.org
2013-04-24 18:24 ` jakub at gcc dot gnu.org
2013-04-24 18:45 ` jakub at gcc dot gnu.org
2013-04-25  7:51 ` jakub at gcc dot gnu.org
2013-04-25  9:54 ` jakub at gcc dot gnu.org
2013-04-25 10:12 ` bernds at gcc dot gnu.org
2013-04-26 17:50 ` kirill.k.smirnov at math dot spbu.ru
2014-10-03 14:24 ` [Bug rtl-optimization/57003] [4.8/4.9/5.0 Regression] gcc " ubizjak at gmail dot com
2014-10-03 17:55 ` ubizjak at gmail dot com
2014-10-03 18:08 ` jakub at gcc dot gnu.org
2014-10-03 18:10 ` ubizjak at gmail dot com
2014-10-09  6:36 ` uros at gcc dot gnu.org
2014-10-09  8:22 ` uros at gcc dot gnu.org
2014-10-09  9:06 ` uros at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).