public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd
@ 2015-09-04 15:10 jakub at gcc dot gnu.org
  2015-09-04 18:32 ` [Bug middle-end/67452] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-09-04 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67452
           Summary: LTO ICE with -fopenmp-simd
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: jakub at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, rguenth at gcc dot gnu.org
  Target Milestone: ---

On the gomp-4_1-branch the libgomp.c/for-5.c and libgomp.c++/for-13.C testcases
ICE with intelmic emul offloading, I've reduced it down to -O2 -fopenmp-simd
-flto on the following testcase:
float b[3][3];

__attribute__((used, noinline)) void
foo ()
{
  int v1, v2;
#pragma omp simd collapse(2)
  for (v1 = 0; v1 < 3; v1++)
    for (v2 = 0; v2 < 3; v2++)
      b[v1][v2] = 2.5;
}

int
main ()
{
  asm volatile ("" : : "r" (b) : "memory");
  foo ();
  asm volatile ("" : : "r" (b) : "memory");
  return 0;
}

The ICE is:
In function ‘foo’:
lto1: internal compiler error: in operator[], at vec.h:714
0x73a7a4 vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
../../gcc/vec.h:714
0x73949c vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
../../gcc/vec.h:1180
0xedf193 streamer_tree_cache_get_tree
../../gcc/tree-streamer.h:111
0xee3487 streamer_get_pickled_tree(lto_input_block*, data_in*)
../../gcc/tree-streamer-in.c:1105
0xae9d42 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
../../gcc/lto-streamer-in.c:1428
0xae9f7b lto_input_tree(lto_input_block*, data_in*)
../../gcc/lto-streamer-in.c:1474
0xee1da5 lto_input_ts_decl_minimal_tree_pointers
../../gcc/tree-streamer-in.c:689
0xee31c4 streamer_read_tree_body(lto_input_block*, data_in*, tree_node*)
../../gcc/tree-streamer-in.c:1046
0xae99b2 lto_read_tree_1
../../gcc/lto-streamer-in.c:1304
0xae9abd lto_read_tree
../../gcc/lto-streamer-in.c:1338
0xae9f12 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
../../gcc/lto-streamer-in.c:1457
0xae9b37 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned
int*)
../../gcc/lto-streamer-in.c:1362
0xae9f61 lto_input_tree(lto_input_block*, data_in*)
../../gcc/lto-streamer-in.c:1472
0xae828a input_cfg
../../gcc/lto-streamer-in.c:863
0xae8e71 input_function
../../gcc/lto-streamer-in.c:1079
0xae9683 lto_read_body_or_constructor
../../gcc/lto-streamer-in.c:1232
0xae993c lto_input_function_body(lto_file_decl_data*, cgraph_node*, char
const*)
../../gcc/lto-streamer-in.c:1278
0x7f4d60 cgraph_node::get_untransformed_body()
../../gcc/cgraph.c:3286
0x800c84 cgraph_node::expand()
../../gcc/cgraphunit.c:1892
0x801395 expand_all_functions
../../gcc/cgraphunit.c:2056
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.
lto-wrapper: fatal error: ./xgcc returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

The problem is that early optimizations eliminate simduid.3 uses and during
release_ssa pass it is removed from cfun->local_decls, but remains in
loop->simduid, and the LTO streaming doesn't expect to have trees streamed too
late (during output_cfg) apparently.
>From gcc-bugs-return-496379-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Sep 04 15:22:08 2015
Return-Path: <gcc-bugs-return-496379-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24578 invoked by alias); 4 Sep 2015 15:22:08 -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 18945 invoked by uid 48); 4 Sep 2015 15:22:04 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67453] New: vtable not emitted for class with no key method and defaulted destructor with attribute((used))
Date: Fri, 04 Sep 2015 15:22:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.4
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-67453-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-09/txt/msg00357.txt.bz2
Content-length: 904

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

            Bug ID: 67453
           Summary: vtable not emitted for class with no key method and
                    defaulted destructor with attribute((used))
           Product: gcc
           Version: 4.9.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

>From https://gcc.gnu.org/ml/gcc-help/2015-09/msg00015.html

The following class when compiled with g++ 4.9.2 emits the vtable for class
Foo:

class Foo
{

  virtual void dosomething() { }
  virtual ~Foo() noexcept __attribute__((used)) { }
};

The following class when compiled does not emit the vtable:

class Foo
{

  virtual void dosomething() { }
  virtual ~Foo() noexcept __attribute__((used)) = default;
};


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

* [Bug middle-end/67452] LTO ICE with -fopenmp-simd
  2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
@ 2015-09-04 18:32 ` jakub at gcc dot gnu.org
  2015-09-04 18:37 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-09-04 18:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Sep  4 18:32:00 2015
New Revision: 227498

URL: https://gcc.gnu.org/viewcvs?rev=227498&root=gcc&view=rev
Log:
        PR middle-end/67452
        * tree-ssa-live.c: Include cfgloop.h.
        (remove_unused_locals): Clear loop->simduid if simduid is about
        to be removed from cfun->local_decls.

        * gcc.dg/lto/pr67452_0.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/lto/pr67452_0.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-live.c


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

* [Bug middle-end/67452] LTO ICE with -fopenmp-simd
  2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
  2015-09-04 18:32 ` [Bug middle-end/67452] " jakub at gcc dot gnu.org
@ 2015-09-04 18:37 ` jakub at gcc dot gnu.org
  2015-09-04 18:37 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-09-04 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Sep  4 18:36:59 2015
New Revision: 227499

URL: https://gcc.gnu.org/viewcvs?rev=227499&root=gcc&view=rev
Log:
        PR middle-end/67452
        * tree-ssa-live.c: Include cfgloop.h.
        (remove_unused_locals): Clear loop->simduid if simduid is about
        to be removed from cfun->local_decls.

        * gcc.dg/lto/pr67452_0.c: New test.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/lto/pr67452_0.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/testsuite/ChangeLog
    branches/gcc-5-branch/gcc/tree-ssa-live.c


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

* [Bug middle-end/67452] LTO ICE with -fopenmp-simd
  2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
  2015-09-04 18:32 ` [Bug middle-end/67452] " jakub at gcc dot gnu.org
  2015-09-04 18:37 ` jakub at gcc dot gnu.org
@ 2015-09-04 18:37 ` jakub at gcc dot gnu.org
  2022-01-01 11:44 ` [Bug middle-end/67452] [5/6 Regression] " pinskia at gcc dot gnu.org
  2022-01-01 11:45 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-09-04 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

* [Bug middle-end/67452] [5/6 Regression] LTO ICE with -fopenmp-simd
  2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-09-04 18:37 ` jakub at gcc dot gnu.org
@ 2022-01-01 11:44 ` pinskia at gcc dot gnu.org
  2022-01-01 11:45 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-01 11:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |5.1.0, 5.2.0
            Summary|LTO ICE with -fopenmp-simd  |[5/6 Regression] LTO ICE
                   |                            |with -fopenmp-simd
   Target Milestone|---                         |5.3
      Known to work|                            |4.9.4, 5.3.0, 6.1.0

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

* [Bug middle-end/67452] [5/6 Regression] LTO ICE with -fopenmp-simd
  2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-01-01 11:44 ` [Bug middle-end/67452] [5/6 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-01 11:45 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-01 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evstupac at gmail dot com

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 66835 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2022-01-01 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-04 15:10 [Bug middle-end/67452] New: LTO ICE with -fopenmp-simd jakub at gcc dot gnu.org
2015-09-04 18:32 ` [Bug middle-end/67452] " jakub at gcc dot gnu.org
2015-09-04 18:37 ` jakub at gcc dot gnu.org
2015-09-04 18:37 ` jakub at gcc dot gnu.org
2022-01-01 11:44 ` [Bug middle-end/67452] [5/6 Regression] " pinskia at gcc dot gnu.org
2022-01-01 11:45 ` 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).