public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67405] New: ICE on invalid use of struct on x86_64-linux-gnu
@ 2015-08-31  6:02 su at cs dot ucdavis.edu
  2015-08-31 13:00 ` [Bug target/67405] " ienkovich at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-08-31  6:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67405
           Summary: ICE on invalid use of struct on x86_64-linux-gnu
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk on
x86_64-linux-gnu.  


$ g++-trunk -v
Using built-in specs.
COLLECT_GCC=g++-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20150830 (experimental) [trunk revision 227326] (GCC) 
$ 
$ g++-trunk small.cc
small.cc:3:5: error: field ‘f’ has incomplete type ‘S’
   S f;
     ^
small.cc:1:8: note: definition of ‘struct S’ is not complete until the closing
brace
 struct S
        ^
small.cc: In function ‘void fn1(S)’:
small.cc:7:1: internal compiler error: Segmentation fault
 fn1 (S p1)
 ^
0xc8051f crash_signal
        ../../gcc-trunk/gcc/toplev.c:352
0xd32808 tree_int_cst_elt_check(tree_node*, int, char const*, int, char const*)
        ../../gcc-trunk/gcc/tree.h:3057
0xd32808 chkp_find_bound_slots_1(tree_node const*, bitmap_head*, long)
        ../../gcc-trunk/gcc/tree-chkp.c:1671
0xd32b9e chkp_find_bound_slots(tree_node const*, bitmap_head*)
        ../../gcc-trunk/gcc/tree-chkp.c:1702
0xd32b9e chkp_type_bounds_count(tree_node const*)
        ../../gcc-trunk/gcc/tree-chkp.c:972
0xf865a7 ix86_function_arg_advance
        ../../gcc-trunk/gcc/config/i386/i386.c:7786
0xa244cb gimplify_parameters()
        ../../gcc-trunk/gcc/function.c:4086
0xa81757 gimplify_body(tree_node*, bool)
        ../../gcc-trunk/gcc/gimplify.c:9199
0xa81af6 gimplify_function_tree(tree_node*)
        ../../gcc-trunk/gcc/gimplify.c:9361
0x900337 cgraph_node::analyze()
        ../../gcc-trunk/gcc/cgraphunit.c:636
0x90351b analyze_functions
        ../../gcc-trunk/gcc/cgraphunit.c:1028
0x9040a8 symbol_table::finalize_compilation_unit()
        ../../gcc-trunk/gcc/cgraphunit.c:2477
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.
$ 


---------------


struct S
{
  S f;
};

void
fn1 (S p1)
{
}
>From gcc-bugs-return-495951-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Aug 31 07:51:15 2015
Return-Path: <gcc-bugs-return-495951-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 71761 invoked by alias); 31 Aug 2015 07:51:15 -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 71726 invoked by uid 48); 31 Aug 2015 07:51:11 -0000
From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libgomp/67406] New: OMP SIMD cloning does not generate fma instruction for AVX2 target
Date: Mon, 31 Aug 2015 07:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libgomp
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: vincenzo.innocente at cern dot ch
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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone
Message-ID: <bug-67406-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-08/txt/msg02093.txt.bz2
Content-length: 1502

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

            Bug ID: 67406
           Summary: OMP SIMD cloning does not generate fma instruction for
                    AVX2 target
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincenzo.innocente at cern dot ch
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

given
at simdCloning.cc
#pragma omp declare simd notinbranch
float fma(float x,float y, float z) {
   return x+y*z;
}

compiled with
c++ -S -fopenmp -Ofast -Wall simdCloning.cc; cat simdCloning.s
will generate the same code for AVX and AVX2 clones
__ZGVdN8vvv__Z3fmafff:
LFB3:
        leaq    8(%rsp), %r10
LCFI5:
        andq    $-32, %rsp
        vmulps  %ymm2, %ymm1, %ymm1
        pushq   -8(%r10)
        pushq   %rbp
        vaddps  %ymm0, %ymm1, %ymm0

while I would have expected
__ZGVdN8vvv__Z3fmafff:
LFB3:
        leaq    8(%rsp), %r10
LCFI5:
        andq    $-32, %rsp
        vfmadd231ps     %ymm2, %ymm1, %ymm0
        pushq   -8(%r10)
        pushq   %rbp


this last code has been obtained compiling with -mfma.
unfortunately in this case ALL clones uses avx2 instructions
(so again AVX and AVX2 clones are identical)


btw: is there any reason why the AVX512 clone is not generated?
I am using gcc version 6.0.0 20150801 (experimental) [trunk revision 226463]
(GCC)


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

* [Bug target/67405] ICE on invalid use of struct on x86_64-linux-gnu
  2015-08-31  6:02 [Bug c++/67405] New: ICE on invalid use of struct on x86_64-linux-gnu su at cs dot ucdavis.edu
@ 2015-08-31 13:00 ` ienkovich at gcc dot gnu.org
  2015-09-01 14:39 ` ienkovich at gcc dot gnu.org
  2015-09-02  9:45 ` ienkovich at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-08-31 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-08-31
           Assignee|unassigned at gcc dot gnu.org      |ienkovich at gcc dot gnu.org
     Ever confirmed|0                           |1


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

* [Bug target/67405] ICE on invalid use of struct on x86_64-linux-gnu
  2015-08-31  6:02 [Bug c++/67405] New: ICE on invalid use of struct on x86_64-linux-gnu su at cs dot ucdavis.edu
  2015-08-31 13:00 ` [Bug target/67405] " ienkovich at gcc dot gnu.org
@ 2015-09-01 14:39 ` ienkovich at gcc dot gnu.org
  2015-09-02  9:45 ` ienkovich at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-09-01 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
Author: ienkovich
Date: Tue Sep  1 14:38:42 2015
New Revision: 227373

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

        PR target/67405
        * tree-chkp.c (chkp_find_bound_slots_1): Add NULL check.

gcc/testsuite/

        PR target/67405
        * g++.dg/pr67405.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/pr67405.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-chkp.c


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

* [Bug target/67405] ICE on invalid use of struct on x86_64-linux-gnu
  2015-08-31  6:02 [Bug c++/67405] New: ICE on invalid use of struct on x86_64-linux-gnu su at cs dot ucdavis.edu
  2015-08-31 13:00 ` [Bug target/67405] " ienkovich at gcc dot gnu.org
  2015-09-01 14:39 ` ienkovich at gcc dot gnu.org
@ 2015-09-02  9:45 ` ienkovich at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ienkovich at gcc dot gnu.org @ 2015-09-02  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


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

end of thread, other threads:[~2015-09-02  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-31  6:02 [Bug c++/67405] New: ICE on invalid use of struct on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-08-31 13:00 ` [Bug target/67405] " ienkovich at gcc dot gnu.org
2015-09-01 14:39 ` ienkovich at gcc dot gnu.org
2015-09-02  9:45 ` 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).