public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/53427] New: [4.8 Regression] Bootstrap failure
@ 2012-05-20 18:41 hjl.tools at gmail dot com
  2012-05-20 20:01 ` [Bug bootstrap/53427] " ubizjak at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-05-20 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53427
           Summary: [4.8 Regression] Bootstrap failure
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: areg.melikadamyan@gmail.com, ubizjak@gmail.com
            Target: x86-64


On Linux/x86-64, bootstrap failed with -mavx:

[hjl@gnu-6 gcc]$ cat /tmp/foo.c
struct gomp_task {
  void *fn_data;
};
extern void *gomp_malloc (unsigned long int);
void GOMP_task (void (*fn) (void *), void *data,
        void (*cpyfn) (void *, void *),
        long arg_size, long arg_align)
{
  struct gomp_task *task;
  char *arg;
  task = gomp_malloc (sizeof (*task) + arg_size + arg_align - 1);
  __builtin_memcpy (arg, data, arg_size);
  task->fn_data = arg;
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -S -O2 /tmp/foo.c  -mavx  -m64
/tmp/foo.c: In function \u2018GOMP_task\u2019:
/tmp/foo.c:14:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 gcc]$


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

* [Bug bootstrap/53427] [4.8 Regression] Bootstrap failure
  2012-05-20 18:41 [Bug bootstrap/53427] New: [4.8 Regression] Bootstrap failure hjl.tools at gmail dot com
@ 2012-05-20 20:01 ` ubizjak at gmail dot com
  2012-05-20 20:02 ` [Bug middle-end/53427] " pinskia at gcc dot gnu.org
  2012-05-20 20:02 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2012-05-20 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-05-20 19:14:20 UTC ---
(gdb) bt
#0  save_call_clobbered_regs () at ../../gcc-svn/trunk/gcc/caller-save.c:877
#1  0x0000000000873bd7 in reload (first=0x7ffff1b100c0, global=1) at
../../gcc-svn/trunk/gcc/reload1.c:939
#2  0x00000000007b6488 in do_reload () at ../../gcc-svn/trunk/gcc/ira.c:4261
#3  rest_of_handle_reload () at ../../gcc-svn/trunk/gcc/ira.c:4352
#4  0x0000000000827645 in execute_one_pass (pass=0x1427920) at
../../gcc-svn/trunk/gcc/passes.c:2183
#5  0x0000000000827a05 in execute_pass_list (pass=0x1427920) at
../../gcc-svn/trunk/gcc/passes.c:2238
#6  0x0000000000827a17 in execute_pass_list (pass=0x1428060) at
../../gcc-svn/trunk/gcc/passes.c:2239
#7  0x0000000000616688 in expand_function (node=0x7ffff19b1750) at
../../gcc-svn/trunk/gcc/cgraphunit.c:1603
#8  0x000000000061822b in expand_all_functions () at
../../gcc-svn/trunk/gcc/cgraphunit.c:1708
#9  compile () at ../../gcc-svn/trunk/gcc/cgraphunit.c:2007

(gdb) list
872                       && HARD_REGISTER_P (cheap)
873                       && TEST_HARD_REG_BIT (call_used_reg_set, REGNO
(cheap)))
874                     {
875                       rtx call_set = single_set (insn);
876                       rtx dest = SET_DEST (call_set);
877                       rtx pat = gen_rtx_SET (VOIDmode, cheap,
878                                              copy_rtx (dest));
879                       chain = insert_one_insn (chain, 0, -1, pat);
880                     }
881                 }

(gdb) p call_set
$7 = (rtx_def *) 0x0

(gdb) p debug_rtx (insn)
(call_insn 22 21 25 2 (parallel [
            (set (reg:DI 0 ax)
                (call (mem:QI (symbol_ref:DI ("memcpy") [flags 0x41]
<function_decl 0x7ffff1aee600 memcpy>) [0 memcpy S1 A8])
                    (const_int 0 [0])))
            (unspec [
                    (const_int 2 [0x2])
                ] UNSPEC_CALL_NEEDS_VZEROUPPER)
        ]) pr53427.c:12 632 {*call_value_vzeroupper}
     (expr_list:REG_RETURNED (reg/v/f:DI 2 cx [orig:64 arg ] [64])
        (expr_list:REG_DEAD (reg:DI 5 di)
            (expr_list:REG_DEAD (reg:DI 4 si)
                (expr_list:REG_DEAD (reg:DI 1 dx)
                    (expr_list:REG_UNUSED (reg:DI 0 ax)
                        (expr_list:REG_EH_REGION (const_int 0 [0])
                            (nil)))))))
    (expr_list:REG_FRAME_RELATED_EXPR (set (reg:DI 0 ax)
            (reg:DI 5 di))
        (expr_list:REG_FRAME_RELATED_EXPR (use (reg:DI 5 di))
            (expr_list:REG_FRAME_RELATED_EXPR (use (reg:DI 4 si))
                (expr_list:REG_FRAME_RELATED_EXPR (use (reg:DI 1 dx))
                    (nil))))))

As said elsewhere, tagging call insns with vzeroupper unspecs was not a good
idea. While it worked, it is very fragile and not future proof.

Please look at PR 47440. The fix for that PR will magically avoid failures of
this type.


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

* [Bug middle-end/53427] [4.8 Regression] Bootstrap failure
  2012-05-20 18:41 [Bug bootstrap/53427] New: [4.8 Regression] Bootstrap failure hjl.tools at gmail dot com
  2012-05-20 20:01 ` [Bug bootstrap/53427] " ubizjak at gmail dot com
  2012-05-20 20:02 ` [Bug middle-end/53427] " pinskia at gcc dot gnu.org
@ 2012-05-20 20:02 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-20 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-20 19:36:25 UTC ---
This is a dup of bug 53373.  No reason for keeping this around.

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


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

* [Bug middle-end/53427] [4.8 Regression] Bootstrap failure
  2012-05-20 18:41 [Bug bootstrap/53427] New: [4.8 Regression] Bootstrap failure hjl.tools at gmail dot com
  2012-05-20 20:01 ` [Bug bootstrap/53427] " ubizjak at gmail dot com
@ 2012-05-20 20:02 ` pinskia at gcc dot gnu.org
  2012-05-20 20:02 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-20 20:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-20
          Component|bootstrap                   |middle-end
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-20 19:34:29 UTC ---
Confirmed:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000871943 in save_call_clobbered_regs () at
/home/pinskia/src/local/gcc/gcc/caller-save.c:876
876              rtx dest = SET_DEST (call_set);
(gdb) bt
#0  0x0000000000871943 in save_call_clobbered_regs () at
/home/pinskia/src/local/gcc/gcc/caller-save.c:876
#1  0x0000000001854572 in reload (first=0x7ffff711d0c0, global=1) at
/home/pinskia/src/local/gcc/gcc/reload1.c:939
#2  0x000000000127c20a in do_reload () at
/home/pinskia/src/local/gcc/gcc/ira.c:4261
#3  0x000000000127c3b9 in rest_of_handle_reload () at
/home/pinskia/src/local/gcc/gcc/ira.c:4352
#4  0x000000000166d66c in execute_one_pass (pass=0x4cd7980) at
/home/pinskia/src/local/gcc/gcc/passes.c:2183


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

end of thread, other threads:[~2012-05-20 20:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-20 18:41 [Bug bootstrap/53427] New: [4.8 Regression] Bootstrap failure hjl.tools at gmail dot com
2012-05-20 20:01 ` [Bug bootstrap/53427] " ubizjak at gmail dot com
2012-05-20 20:02 ` [Bug middle-end/53427] " pinskia at gcc dot gnu.org
2012-05-20 20:02 ` pinskia 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).