public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used
@ 2015-05-07  9:49 ienkovich at gcc dot gnu.org
  2015-05-07 13:26 ` [Bug rtl-optimization/66048] " ubizjak at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-05-07  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66048
           Summary: [i386] ICE in create_pre_exit when both AVX and MPX
                    are used
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ienkovich at gcc dot gnu.org
  Target Milestone: ---

Created attachment 35485
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35485&action=edit
reproducer

>gcc mode-switch.cc -march=corei7-avx -mmpx -fcheck-pointer-bounds -O2 -c

mode-switch.cc: In function 'c1 test.chkp(c2, #'pointer_bounds_type' not
supported by dump_type#<type error>, void, ...)':
mode-switch.cc:13:1: internal compiler error: in create_pre_exit, at
mode-switching.c:464
 }
 ^
0x185874c create_pre_exit
        ../../gcc/gcc/mode-switching.c:450
0x18589cc optimize_mode_switching
        ../../gcc/gcc/mode-switching.c:547
0x1859c14 execute
        ../../gcc/gcc/mode-switching.c:905
0xe6ad44 gcc::pass_manager::execute_pass_mode_switching()
        ../../gcc/gcc/passes.c:167
0x12ddb20 rest_of_handle_insert_vzeroupper
        ../../gcc/gcc/config/i386/i386.c:2553
0x12ddbce execute
        ../../gcc/gcc/config/i386/i386.c:2589
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
@ 2015-05-07 13:26 ` ubizjak at gmail dot com
  2015-05-08 12:11 ` ienkovich at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2015-05-07 13:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Ilya Enkovich from comment #0)
> Created attachment 35485 [details]
> reproducer
> 
> >gcc mode-switch.cc -march=corei7-avx -mmpx -fcheck-pointer-bounds -O2 -c
> 
> mode-switch.cc: In function 'c1 test.chkp(c2, #'pointer_bounds_type' not
> supported by dump_type#<type error>, void, ...)':
> mode-switch.cc:13:1: internal compiler error: in create_pre_exit, at
> mode-switching.c:464

There is a *very* picky assert in mode-switching.c that otherwise allows
various exceptions when expected sequence:

(set (reg X) ...)

(use (reg X))

is NOT found. But... you'll have to explain why certain exception is allowed.
In your case, a multi_reg_return condition triggered, so:

--cut here--
Index: mode-switching.c
===================================================================
--- mode-switching.c    (revision 222869)
+++ mode-switching.c    (working copy)
@@ -461,7 +461,10 @@ create_pre_exit (int n_entities, int *entity_map,
                           This doesn't actually cause reload
                           failures, so let it pass.  */
                        || (GET_MODE_CLASS (GET_MODE (ret_reg)) != MODE_INT
-                           && nregs != 1));
+                           && nregs != 1)
+                       /* Comment here.  */
+                       || (multi_reg_return
+                           && /* some tight condition */ 1));

            if (!NOTE_INSN_BASIC_BLOCK_P (last_insn))
              {
--cut here--

Please note that this part of the code can make a grown man cry...
>From gcc-bugs-return-485745-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 07 14:03:02 2015
Return-Path: <gcc-bugs-return-485745-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2948 invoked by alias); 7 May 2015 14:03:02 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 2563 invoked by uid 48); 7 May 2015 14:02:58 -0000
From: "t at sharklasers dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/66029] Build error compiling gcc5.1 using LTO
Date: Thu, 07 May 2015 14:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: t at sharklasers dot com
X-Bugzilla-Status: WAITING
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66029-4-wQS6MTdjf0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66029-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66029-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00585.txt.bz2
Content-length: 368

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf029

--- Comment #9 from JD <t at sharklasers dot com> ---
I reconfigured and recompiled binutils 2.25 with the --enable-plugins and
--enable-lto flags.

But I'm afraid I must be missing something: Linking with the newly compiled ld
2.25 works fine without lto but using it with lto produces undefined reference
errors.


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
  2015-05-07 13:26 ` [Bug rtl-optimization/66048] " ubizjak at gmail dot com
@ 2015-05-08 12:11 ` ienkovich at gcc dot gnu.org
  2015-05-08 13:30 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-05-08 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #1)
> There is a *very* picky assert in mode-switching.c that otherwise allows
> various exceptions when expected sequence:
> 
> (set (reg X) ...)
> 
> (use (reg X))

With MPX we have multiple (use (reg X)) and only the last one is examined. It
is always the one created for bounds.  Simple swap makes it work.  With this
patch test passes:

--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5224,8 +5224,8 @@ diddle_return_value_1 (void (*doit) (rtx, void *), void
*arg, rtx outgoing)
 void
 diddle_return_value (void (*doit) (rtx, void *), void *arg)
 {
-  diddle_return_value_1 (doit, arg, crtl->return_rtx);
   diddle_return_value_1 (doit, arg, crtl->return_bnd);
+  diddle_return_value_1 (doit, arg, crtl->return_rtx);
 }

 static void
>From gcc-bugs-return-485840-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 08 12:31:44 2015
Return-Path: <gcc-bugs-return-485840-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 34636 invoked by alias); 8 May 2015 12:31:43 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 34508 invoked by uid 48); 8 May 2015 12:31:40 -0000
From: "matthew.thompson at nasa dot gov" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66058] Backslash in comment kills compile
Date: Fri, 08 May 2015 12:31:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.1.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: matthew.thompson at nasa dot gov
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Resolution: INVALID
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66058-4-1ldydsGpd8@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66058-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66058-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00680.txt.bz2
Content-length: 1297

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf058

--- Comment #3 from Matt Thompson <matthew.thompson at nasa dot gov> ---
(In reply to kargl from comment #2)
> (In reply to Matt Thompson from comment #1)
> > Addendum,
> >
> > I've tried various gfortran flags, but for the life of me, none seem to get
> > this to work.
> >
> > Matt
>
> You're getting the expected behaviour implied by the .F extention.
> The pre-processor is doing what it is should (from n1256.pdf)
>
>     Each instance of a backslash character (\) immediately followed
>     by a new-line character is deleted, splicing physical source
>     lines to form logical source lines.  Only the last backslash on
>     any physical source line shall be eligible for being part of
>     such a splice. A source file that is not empty shall end in a
>     new-line character, which shall not be immediately preceded
>     by a backslash character before any such splicing takes place.
>
> The option that you are looking for is -xf95.  It tells gfortran
> to ignore the .F extension and treat the code as Fortran 95 without
> doing the pre-processing.

Ahh. Okay, thanks. It might be nice to put a reference to -x in the gfortran
manpage. It always confuses me that some Fortran options are only visible in
the gcc manpage...


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
  2015-05-07 13:26 ` [Bug rtl-optimization/66048] " ubizjak at gmail dot com
  2015-05-08 12:11 ` ienkovich at gcc dot gnu.org
@ 2015-05-08 13:30 ` ubizjak at gmail dot com
  2015-05-13  7:50 ` ienkovich at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2015-05-08 13:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Ilya Enkovich from comment #2)
> (In reply to Uroš Bizjak from comment #1)
> > There is a *very* picky assert in mode-switching.c that otherwise allows
> > various exceptions when expected sequence:
> > 
> > (set (reg X) ...)
> > 
> > (use (reg X))
> 
> With MPX we have multiple (use (reg X)) and only the last one is examined.
> It is always the one created for bounds.  Simple swap makes it work.  With
> this patch test passes:

Yes, this could also work. BND registers do not (and should not) require any
mode switching, while return reg could need mode switch. So, return reg should
be the last one.
>From gcc-bugs-return-485853-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 08 14:49:12 2015
Return-Path: <gcc-bugs-return-485853-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 87177 invoked by alias); 8 May 2015 14:49:12 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 86743 invoked by uid 48); 8 May 2015 14:49:08 -0000
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66071] Calling condition variable's notify_all() causes SEGFAULT when the binary is statically linked
Date: Fri, 08 May 2015 14:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: pinskia at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66071-4-jg5jtfjU7z@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66071-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66071-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00693.txt.bz2
Content-length: 236

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf071

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you run gdb to see where the crash is? This might be a glibc "issue" by
including only part of pthread library.


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-05-08 13:30 ` ubizjak at gmail dot com
@ 2015-05-13  7:50 ` ienkovich at gcc dot gnu.org
  2015-07-23 10:19 ` ienkovich at gcc dot gnu.org
  2015-07-23 11:14 ` ienkovich at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-05-13  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
Author: ienkovich
Date: Wed May 13 07:49:59 2015
New Revision: 223114

URL: https://gcc.gnu.org/viewcvs?rev=223114&root=gcc&view=rev
Log:
gcc/

        PR target/66048
        * function.c (diddle_return_value_1): Process bounds first.
        * config/i38/i386.c (ix86_function_value_regno_p): Add bnd1
        register.

gcc/testsuite/

        PR target/66048
        * gcc.target/i386/mpx/pr66048.cc: New.


Added:
    trunk/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/function.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-05-13  7:50 ` ienkovich at gcc dot gnu.org
@ 2015-07-23 10:19 ` ienkovich at gcc dot gnu.org
  2015-07-23 11:14 ` ienkovich at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-07-23 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
Author: ienkovich
Date: Thu Jul 23 10:19:03 2015
New Revision: 226098

URL: https://gcc.gnu.org/viewcvs?rev=226098&root=gcc&view=rev
Log:
gcc/

        Backport from mainline r223114.
        2015-05-13  Ilya Enkovich  <ilya.enkovich@intel.com>

        PR target/66048
        * function.c (diddle_return_value_1): Process bounds first.
        * config/i38/i386.c (ix86_function_value_regno_p): Add bnd1
        register.

gcc/testsuite/

        Backport from mainline r223114.
        2015-05-13  Ilya Enkovich  <ilya.enkovich@intel.com>

        PR target/66048
        * gcc.target/i386/mpx/pr66048.cc: New.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/config/i386/i386.c
    branches/gcc-5-branch/gcc/function.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used
  2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-07-23 10:19 ` ienkovich at gcc dot gnu.org
@ 2015-07-23 11:14 ` ienkovich at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-07-23 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

Ilya Enkovich <ienkovich at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
Fixed


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

end of thread, other threads:[~2015-07-23 11:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07  9:49 [Bug rtl-optimization/66048] New: [i386] ICE in create_pre_exit when both AVX and MPX are used ienkovich at gcc dot gnu.org
2015-05-07 13:26 ` [Bug rtl-optimization/66048] " ubizjak at gmail dot com
2015-05-08 12:11 ` ienkovich at gcc dot gnu.org
2015-05-08 13:30 ` ubizjak at gmail dot com
2015-05-13  7:50 ` ienkovich at gcc dot gnu.org
2015-07-23 10:19 ` ienkovich at gcc dot gnu.org
2015-07-23 11:14 ` ienkovich 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).