Bug 64014 - [5 regression] Failure of gcc.dg/torture/stackalign/regparm-1.c
Summary: [5 regression] Failure of gcc.dg/torture/stackalign/regparm-1.c
Status: RESOLVED DUPLICATE of bug 63977
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2014-11-21 09:18 UTC by Francois-Xavier Coudert
Modified: 2014-11-21 13:40 UTC (History)
1 user (show)

See Also:
Host: x86_64-apple-darwin14
Target: x86_64-apple-darwin14
Build: x86_64-apple-darwin14
Known to work:
Known to fail:
Last reconfirmed: 2014-11-21 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francois-Xavier Coudert 2014-11-21 09:18:34 UTC
On x86_64-apple-darwin14, gcc.dg/torture/stackalign/regparm-1.c is failing (at -m32). This regression was introduced somewhere between r217694 (passes) and r217836 (fails).

Reduced reproducer is:

int __attribute__ ((__regparm__(3)))
test_realigned (int j, int k, int l)
{
  int y __attribute__((aligned(64)));
  return ((__PTRDIFF_TYPE__) y) & (__alignof__(y) - 1);
}

which fails with "gcc -m32" with an ICE. The backtrace is:

    frame #9: 0x0000000100d2df56 cc1`fancy_abort(file=<unavailable>, line=<unavailable>, function=<unavailable>) + 38 at diagnostic.c:1249
    frame #10: 0x0000000100ce2047 cc1`ix86_expand_prologue() + 5751 at i386.c:11347
    frame #11: 0x00000001002374fb cc1`gen_prologue() + 11 at i386.md:12095
    frame #12: 0x000000010064d82c cc1`thread_prologue_and_epilogue_insns() + 204 at function.c:5906
    frame #13: 0x000000010064e207 cc1`execute [inlined] rest_of_handle_thread_prologue_and_epilogue + 22 at function.c:6476
    frame #14: 0x000000010064e1f1 cc1`execute(this=<unavailable>, (null)=<unavailable>) + 1
    frame #15: 0x00000001008b1c6b cc1`execute_one_pass(pass=0x0000000141e13910) + 379 at passes.c:2311
    frame #16: 0x00000001008b210e cc1`execute_pass_list_1(pass=0x0000000141e13910) + 30 at passes.c:2363
    frame #17: 0x00000001008b2120 cc1`execute_pass_list_1(pass=0x0000000141e13670) + 48 at passes.c:2364
    frame #18: 0x00000001008b2120 cc1`execute_pass_list_1(pass=0x0000000141e12590) + 48 at passes.c:2364
    frame #19: 0x00000001008b2169 cc1`execute_pass_list(fn=0x0000000142d1f5e8, pass=0x0000000141e0f3b0) + 25 at passes.c:2374
    frame #20: 0x00000001004cbde5 cc1`cgraph_node::expand(this=0x0000000142c12498) + 261 at cgraphunit.c:1773
    frame #21: 0x00000001004ccd0f cc1`output_in_order(no_reorder=<unavailable>) + 559 at cgraphunit.c:2011
    frame #22: 0x00000001004cd27a cc1`symbol_table::compile(this=0x0000000142c05000) + 922 at cgraphunit.c:2257
    frame #23: 0x00000001004cf3ce cc1`symbol_table::finalize_compilation_unit(this=0x0000000142c05000) + 110 at cgraphunit.c:2340
    frame #24: 0x0000000100020ec9 cc1`c_write_global_declarations() + 601 at c-decl.c:10777
    frame #25: 0x000000010098d20f cc1`compile_file + 143 at toplev.c:584

Any optimization (-O1, -O2, -O3 or -Os) makes the testcase pass.
Comment 1 Jakub Jelinek 2014-11-21 13:38:07 UTC
Dup of PR63977 ?
Comment 2 Francois-Xavier Coudert 2014-11-21 13:40:44 UTC
(In reply to Jakub Jelinek from comment #1)
> Dup of PR63977 ?

Looks like it, indeed. Don't know why I didn't find it, sometimes bugzilla search seems a bit conservative in the results it shows.

Next time I run a fresh bootstrap, I'll see if it's still there and reopen it if needed. Thanks!

*** This bug has been marked as a duplicate of bug 63977 ***