public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit)
@ 2023-02-19 23:53 gcc.gnu.org+lufm at davidak dot de
2023-02-20 8:34 ` [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 rguenth at gcc dot gnu.org
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: gcc.gnu.org+lufm at davidak dot de @ 2023-02-19 23:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Bug ID: 108854
Summary: tbb-2021.8.0 fails on i686-linux (32-bit)
Product: gcc
Version: 11.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc.gnu.org+lufm at davidak dot de
Target Milestone: ---
Created attachment 54490
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54490&action=edit
full build log
Hello,
i tried to build tbb_2021_8 for i686-linux platform on x86_64-linux.
The build fails and the log said i should create a bug report here.
I'm not a developer and never used gcc manually, so please be patient with me.
I don't know how to get the "preprocessed file (*.i*) that triggers the bug",
but otherwise you should have all requested information.
I added those flags to the build you see the log of in the attachment:
# For 32-bit build
cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-m32" ];
NIX_CFLAGS_COMPILE = [ "-Wall -Wextra -fno-strict-aliasing -fwrapv
-fno-aggressive-loop-optimizations -fsanitize=undefined" ];
You can reproduce the issue using the Nix package manager and this command:
nix-build
https://github.com/davidak/nixpkgs/archive/refs/heads/tbb-split-32-bit-fix.zip
--system i686-linux -A tbb_2021_8
Downstream issue: https://github.com/oneapi-src/oneTBB/issues/1030 (maybe the
issue is in their code)
The code: https://github.com/oneapi-src/oneTBB/tree/v2021.8.0
Tested on NixOS 22.11.2620.de5448dab58
with Intel Core i9 9900K
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
@ 2023-02-20 8:34 ` rguenth at gcc dot gnu.org
2023-02-20 9:52 ` jakub at gcc dot gnu.org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-20 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Component|c++ |middle-end
Last reconfirmed| |2023-02-20
Summary|tbb-2021.8.0 fails on |tbb-2021.8.0 fails on
|i686-linux (32-bit) |i686-linux (32-bit),
| |internal compiler error: in
| |expand_expr_real_1, at
| |expr.c:10281
Target| |i?86-*-*
Keywords| |ice-on-valid-code,
| |needs-reduction
Status|UNCONFIRMED |WAITING
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We still need some sort of testcase
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
2023-02-20 8:34 ` [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 rguenth at gcc dot gnu.org
@ 2023-02-20 9:52 ` jakub at gcc dot gnu.org
2023-02-20 12:14 ` redi at gcc dot gnu.org
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-20 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
See https://gcc.gnu.org/bugs/ for details on what we need.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
2023-02-20 8:34 ` [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 rguenth at gcc dot gnu.org
2023-02-20 9:52 ` jakub at gcc dot gnu.org
@ 2023-02-20 12:14 ` redi at gcc dot gnu.org
2023-02-20 23:31 ` pinskia at gcc dot gnu.org
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-20 12:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to davidak from comment #0)
> I don't know how to get the "preprocessed file (*.i*) that triggers the
> bug", but otherwise you should have all requested information.
Unfortunately that's the most important part.
You should be able to run "make VERBOSE=1" to see the commands that cmake
produces, and then add -save-temps to the command that produces the internal
compiler error. That will create the preprocessed source.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (2 preceding siblings ...)
2023-02-20 12:14 ` redi at gcc dot gnu.org
@ 2023-02-20 23:31 ` pinskia at gcc dot gnu.org
2023-02-20 23:39 ` pinskia at gcc dot gnu.org
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-20 23:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is the ICE:
tbb-i686-linux> during RTL pass: expand
tbb-i686-linux> In file included from
/build/source/src/tbb/../../include/tbb/flow_graph.h:17,
tbb-i686-linux> from
/build/source/test/tbb/test_continue_node.cpp:19:
tbb-i686-linux>
/build/source/src/tbb/../../include/tbb/../oneapi/tbb/flow_graph.h: In member
function 'bool
tbb::detail::d1::broadcast_node<tbb::detail::d1::continue_msg>::_ZThn20_N3tbb6detail2d114broadcast_nodeINS1_12continue_msgEE18register_successorERNS1_8receiverIS3_EE.artificial_thunk.0(tbb::detail::d1::broadcast_node<tbb::detail::d1::continue_msg>::successor_type&)':
tbb-i686-linux>
/build/source/src/tbb/../../include/tbb/../oneapi/tbb/flow_graph.h:1117:10:
internal compiler error: in expand_expr_real_1, at expr.c:10281
tbb-i686-linux> 1117 | bool register_successor( successor_type &r )
override {
tbb-i686-linux> | ^~~~~~~~~~~~~~~~~~
tbb-i686-linux> 0x9301fc9 diagnostic_impl(rich_location*, diagnostic_metadata
const*, int, char const*, char**, diagnostic_t)
tbb-i686-linux> ???:0
tbb-i686-linux> 0x930218b internal_error(char const*, ...)
tbb-i686-linux> ???:0
tbb-i686-linux> 0x82791d5 fancy_abort(char const*, int, char const*)
tbb-i686-linux> ???:0
tbb-i686-linux> 0x82461f7 expand_expr_real_1(tree_node*, rtx_def*,
machine_mode, expand_modifier, rtx_def**, bool) [clone .cold]
tbb-i686-linux> ???:0
tbb-i686-linux> 0x84f4ce5 expand_gimple_stmt(gimple*)
tbb-i686-linux> ???:0
tbb-i686-linux> 0x84fb309 (anonymous
namespace)::pass_expand::execute(function*)
tbb-i686-linux> ???:0
tbb-i686-linux> Please submit a full bug report,
tbb-i686-linux> with preprocessed source if appropriate.
tbb-i686-linux> Please include the complete backtrace with any bug report.
tbb-i686-linux> See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (3 preceding siblings ...)
2023-02-20 23:31 ` pinskia at gcc dot gnu.org
@ 2023-02-20 23:39 ` pinskia at gcc dot gnu.org
2023-02-21 17:00 ` gcc.gnu.org+lufm at davidak dot de
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-20 23:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
_ZThn20_N3tbb6detail2d114broadcast_nodeINS1_12continue_msgEE18register_successorERNS1_8receiverIS3_EE
demangles to:
non-virtual thunk to
tbb::detail::d1::broadcast_node<tbb::detail::d1::continue_msg>::register_successor(tbb::detail::d1::receiver<tbb::detail::d1::continue_msg>&)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (4 preceding siblings ...)
2023-02-20 23:39 ` pinskia at gcc dot gnu.org
@ 2023-02-21 17:00 ` gcc.gnu.org+lufm at davidak dot de
2023-02-21 18:32 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gcc.gnu.org+lufm at davidak dot de @ 2023-02-21 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #6 from davidak <gcc.gnu.org+lufm at davidak dot de> ---
I tried to get the preprocessed source for the last 2 hours, but it does not
end up in the build directory. Maybe Nix does some clean up at the end.
I left a note in the downstream issue that they should provide you the files.
The people at Intel should be more capable than me.
Sorry
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (5 preceding siblings ...)
2023-02-21 17:00 ` gcc.gnu.org+lufm at davidak dot de
@ 2023-02-21 18:32 ` jakub at gcc dot gnu.org
2023-02-22 9:40 ` slyfox at gcc dot gnu.org
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-21 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You can e.g. try to pass additional -freport-bug option, then the preprocessed
source with command line and other important details should be stored into a
/tmp/cc*.out file which the diagnostics will tell you which one it was.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (6 preceding siblings ...)
2023-02-21 18:32 ` jakub at gcc dot gnu.org
@ 2023-02-22 9:40 ` slyfox at gcc dot gnu.org
2023-02-22 13:22 ` jakub at gcc dot gnu.org
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-02-22 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slyfox at gcc dot gnu.org
--- Comment #8 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Created attachment 54505
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54505&action=edit
bug.cpp.xz
I reproduced it locally as well. Extracted preprocessed file as bug.cpp.xz (not
yet reduced).
To crash:
g++ -O3 -Wall -Wextra -Werror -Wfatal-errors -Wno-error=stringop-overflow
-Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg
-std=c++11 -c bug.cpp -fPIC -fstack-protector-strong --param ssp-buffer-size=4
-fno-strict-overflow
during RTL pass: expand
In file included from
/nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/atomic:41,
from
/home/slyfox/nsn/source/src/tbb/../../include/tbb/../oneapi/tbb/flow_graph.h:20,
from
/home/slyfox/nsn/source/src/tbb/../../include/tbb/flow_graph.h:17,
from
/home/slyfox/nsn/source/test/tbb/test_eh_flow_graph.cpp:25:
/nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:
In member function 'bool tbb::detail::d1::input_node<std::tuple<int, int>
>::_ZThn16_N3tbb6detail2d110input_nodeISt5tupleIJiiEEE18register_successorERNS1_8receiverIS4_EE.artificial_thunk.0(successor_type&)':
/nix/store/c4xm3qfkw2npn4vyiyx2pkp95rb27ig8-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:506:36:
internal compiler error: in expand_expr_real_1, at expr.cc:10586
506 | return __atomic_exchange_n(&_M_i, __i, int(__m));
| ^~~~~
0x9764c81 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char
const*, char**, diagnostic_t)
???:0
0x976527c internal_error(char const*, ...)
???:0
0x832b252 fancy_abort(char const*, int, char const*)
???:0
0x82f641b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool) [clone .cold]
???:0
0x86d5b33 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
???:0
0x86e4307 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
???:0
0x86d1ec1 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0x86dbda2 expand_expr_addr_expr_1(tree_node*, rtx_def*, scalar_int_mode,
expand_modifier, unsigned char)
???:0
0x86d16d4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
???:0
0x86dec8e store_expr(tree_node*, rtx_def*, int, bool, bool)
???:0
0x86e07ba expand_assignment(tree_node*, tree_node*, bool) [clone .part.0]
???:0
0x85cb005 expand_gimple_stmt(gimple*)
???:0
0x85cff76 expand_gimple_basic_block(basic_block_def*, bool)
???:0
0x85d1e56 (anonymous namespace)::pass_expand::execute(function*)
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ g++ -v |& unnix
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-12.2.0/bin/g++
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-12.2.0/libexec/gcc/i686-unknown-linux-gnu/12.2.0/lto-wrapper
Target: i686-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (7 preceding siblings ...)
2023-02-22 9:40 ` slyfox at gcc dot gnu.org
@ 2023-02-22 13:22 ` jakub at gcc dot gnu.org
2023-02-22 15:40 ` [Bug middle-end/108854] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-22 13:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reproduced with 11/12, reducing now.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (8 preceding siblings ...)
2023-02-22 13:22 ` jakub at gcc dot gnu.org
@ 2023-02-22 15:40 ` jakub at gcc dot gnu.org
2023-02-23 15:55 ` [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac jakub at gcc dot gnu.org
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-22 15:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
Priority|P3 |P2
Target Milestone|--- |10.5
CC| |hubicka at gcc dot gnu.org,
| |jamborm at gcc dot gnu.org
Summary|tbb-2021.8.0 fails on |[10/11/12/13 Regression]
|i686-linux (32-bit), |tbb-2021.8.0 fails on
|internal compiler error: in |i686-linux (32-bit),
|expand_expr_real_1, at |internal compiler error: in
|expr.c:10281 |expand_expr_real_1, at
| |expr.c:10281
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase for -m32 -O3 -std=c++11 -fPIC:
struct unique_scoped_lock {
unique_scoped_lock(int);
~unique_scoped_lock();
};
struct rw_scoped_lock {
rw_scoped_lock(int, bool);
~rw_scoped_lock();
};
template <typename _Tp> struct Trans_NS___cxx11_list {
typedef _Tp value_type;
void push_front(value_type);
void push_back(value_type &&);
};
class receiver typedef node_priority_t;
struct graph_node {
virtual void reset_node();
};
template <typename> struct sender {
typedef receiver successor_type;
virtual bool register_successor(successor_type &);
};
struct receiver {
virtual node_priority_t priority() { return receiver(); }
};
void fgt_make_edge(void *, void *);
struct successor_cache {
int my_mutex;
Trans_NS___cxx11_list<receiver *> my_successors;
void register_successor(receiver &r) {
rw_scoped_lock l(my_mutex, true);
r.priority();
my_successors.push_front(&r);
my_successors.push_back(&r);
}
};
struct input_node : graph_node, sender<int> {
template <typename Body> input_node(int, Body);
bool register_successor(successor_type &r) {
unique_scoped_lock lock(my_mutex);
my_successors.register_successor(r);
if (my_active)
return true;
}
int my_mutex;
bool my_active;
successor_cache my_successors;
};
inline void make_edge(sender<int> &p) {
receiver s, __trans_tmp_2;
p.register_successor(__trans_tmp_2);
fgt_make_edge(&p, &s);
}
enum TestNodeTypeEnum { nonThrowing, isThrowing };
template <TestNodeTypeEnum> struct absorber_body;
template <class, class InputNodeType, class, class, class, class>
void run_one_priority_queue_node_test() {
int g, input_count;
InputNodeType input(g, input_count);
make_edge(input);
}
template <class, int, TestNodeTypeEnum SinkThrowType>
void run_priority_queue_node_test() {
run_one_priority_queue_node_test<int, input_node, int, int, graph_node,
absorber_body<SinkThrowType>>();
}
void test_priority_queue_node() {
run_priority_queue_node_test<int, isThrowing, nonThrowing>();
run_priority_queue_node_test<int, isThrowing, isThrowing>();
}
This started to ICE (segfault in same_node_or_its_all_contexts_clone_p) with
r10-4511-g6cf67b62c8cda035dccac and starting with
r10-5061-g68188fff88d0c302e6002 it gets the
ICE that shows up to latest trunk.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (9 preceding siblings ...)
2023-02-22 15:40 ` [Bug middle-end/108854] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
@ 2023-02-23 15:55 ` jakub at gcc dot gnu.org
2023-02-23 16:16 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-23 15:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is that duplicate_thunk_for_node when copying the
FUNCTION_DECL node doesn't also copy DECL_ARGUMENTS (unless some changes to the
arguments are needed).
--- gcc/cgraphclones.cc.jj 2023-02-22 20:50:27.417519830 +0100
+++ gcc/cgraphclones.cc 2023-02-23 16:02:29.653090584 +0100
@@ -218,7 +218,17 @@ duplicate_thunk_for_node (cgraph_node *t
body_adj.modify_formal_parameters ();
}
else
- new_decl = copy_node (thunk->decl);
+ {
+ new_decl = copy_node (thunk->decl);
+ for (tree *arg = &DECL_ARGUMENTS (new_decl);
+ *arg; arg = &DECL_CHAIN (*arg))
+ {
+ tree next = DECL_CHAIN (*arg);
+ *arg = copy_node (*arg);
+ DECL_CONTEXT (*arg) = new_decl;
+ DECL_CHAIN (*arg) = next;
+ }
+ }
gcc_checking_assert (!DECL_STRUCT_FUNCTION (new_decl));
gcc_checking_assert (!DECL_INITIAL (new_decl));
seems to fix the ICE.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (10 preceding siblings ...)
2023-02-23 15:55 ` [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac jakub at gcc dot gnu.org
@ 2023-02-23 16:16 ` jakub at gcc dot gnu.org
2023-02-24 10:06 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-23 16:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54519
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54519&action=edit
gcc13-pr108854.patch
Full untested patch.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (11 preceding siblings ...)
2023-02-23 16:16 ` jakub at gcc dot gnu.org
@ 2023-02-24 10:06 ` cvs-commit at gcc dot gnu.org
2023-02-24 10:07 ` [Bug middle-end/108854] [10/11/12 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-24 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:2f1691be517fcdcabae9cd671ab511eb0e08b1d5
commit r13-6319-g2f1691be517fcdcabae9cd671ab511eb0e08b1d5
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Feb 24 11:05:27 2023 +0100
cgraphclones: Don't share DECL_ARGUMENTS between thunk and its artificial
thunk [PR108854]
The following testcase ICEs on x86_64-linux with -m32. The problem is
we create an artificial thunk and because of -fPIC, ia32 and thunk
destination which doesn't bind locally can't use a mi thunk.
The ICE is because during expansion to RTL we see SSA_NAME for a PARM_DECL,
but the PARM_DECL doesn't have DECL_CONTEXT of the current function.
This is because duplicate_thunk_for_node creates a new DECL_ARGUMENTS chain
only if some arguments need modification.
The following patch fixes it by copying the DECL_ARGUMENTS list even if
the arguments can stay as is, to update DECL_CONTEXT on them. While for
mi thunks it doesn't really matter because we don't use those arguments
in any way, for other thunks it is important.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/108854
* cgraphclones.cc (duplicate_thunk_for_node): If no parameter
changes are needed, copy at least DECL_ARGUMENTS PARM_DECL
nodes and adjust their DECL_CONTEXT.
* g++.dg/opt/pr108854.C: New test.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (12 preceding siblings ...)
2023-02-24 10:06 ` cvs-commit at gcc dot gnu.org
@ 2023-02-24 10:07 ` jakub at gcc dot gnu.org
2023-03-19 5:29 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-24 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12/13 Regression] |[10/11/12 Regression]
|tbb-2021.8.0 fails on |tbb-2021.8.0 fails on
|i686-linux (32-bit), |i686-linux (32-bit),
|internal compiler error: in |internal compiler error: in
|expand_expr_real_1, at |expand_expr_real_1, at
|expr.c:10281 since |expr.c:10281 since
|r10-4511-g6cf67b62c8cda035d |r10-4511-g6cf67b62c8cda035d
|ccac |ccac
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11/12 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (13 preceding siblings ...)
2023-02-24 10:07 ` [Bug middle-end/108854] [10/11/12 " jakub at gcc dot gnu.org
@ 2023-03-19 5:29 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:27 ` [Bug middle-end/108854] [10/11 " jakub at gcc dot gnu.org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-19 5:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:3a94ae2d7974b363f2b29df75e994ca07819847d
commit r12-9277-g3a94ae2d7974b363f2b29df75e994ca07819847d
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Feb 24 11:05:27 2023 +0100
cgraphclones: Don't share DECL_ARGUMENTS between thunk and its artificial
thunk [PR108854]
The following testcase ICEs on x86_64-linux with -m32. The problem is
we create an artificial thunk and because of -fPIC, ia32 and thunk
destination which doesn't bind locally can't use a mi thunk.
The ICE is because during expansion to RTL we see SSA_NAME for a PARM_DECL,
but the PARM_DECL doesn't have DECL_CONTEXT of the current function.
This is because duplicate_thunk_for_node creates a new DECL_ARGUMENTS chain
only if some arguments need modification.
The following patch fixes it by copying the DECL_ARGUMENTS list even if
the arguments can stay as is, to update DECL_CONTEXT on them. While for
mi thunks it doesn't really matter because we don't use those arguments
in any way, for other thunks it is important.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/108854
* cgraphclones.cc (duplicate_thunk_for_node): If no parameter
changes are needed, copy at least DECL_ARGUMENTS PARM_DECL
nodes and adjust their DECL_CONTEXT.
* g++.dg/opt/pr108854.C: New test.
(cherry picked from commit 2f1691be517fcdcabae9cd671ab511eb0e08b1d5)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (14 preceding siblings ...)
2023-03-19 5:29 ` cvs-commit at gcc dot gnu.org
@ 2023-03-20 10:27 ` jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-20 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11/12 Regression] |[10/11 Regression]
|tbb-2021.8.0 fails on |tbb-2021.8.0 fails on
|i686-linux (32-bit), |i686-linux (32-bit),
|internal compiler error: in |internal compiler error: in
|expand_expr_real_1, at |expand_expr_real_1, at
|expr.c:10281 since |expr.c:10281 since
|r10-4511-g6cf67b62c8cda035d |r10-4511-g6cf67b62c8cda035d
|ccac |ccac
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 12.3 too.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10/11 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (15 preceding siblings ...)
2023-03-20 10:27 ` [Bug middle-end/108854] [10/11 " jakub at gcc dot gnu.org
@ 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:39 ` [Bug middle-end/108854] [10 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:cc83670c07ff3e0b55e04b64975eb6d4dbfeff5f
commit r11-10716-gcc83670c07ff3e0b55e04b64975eb6d4dbfeff5f
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Feb 24 11:05:27 2023 +0100
cgraphclones: Don't share DECL_ARGUMENTS between thunk and its artificial
thunk [PR108854]
The following testcase ICEs on x86_64-linux with -m32. The problem is
we create an artificial thunk and because of -fPIC, ia32 and thunk
destination which doesn't bind locally can't use a mi thunk.
The ICE is because during expansion to RTL we see SSA_NAME for a PARM_DECL,
but the PARM_DECL doesn't have DECL_CONTEXT of the current function.
This is because duplicate_thunk_for_node creates a new DECL_ARGUMENTS chain
only if some arguments need modification.
The following patch fixes it by copying the DECL_ARGUMENTS list even if
the arguments can stay as is, to update DECL_CONTEXT on them. While for
mi thunks it doesn't really matter because we don't use those arguments
in any way, for other thunks it is important.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/108854
* cgraphclones.c (duplicate_thunk_for_node): If no parameter
changes are needed, copy at least DECL_ARGUMENTS PARM_DECL
nodes and adjust their DECL_CONTEXT.
* g++.dg/opt/pr108854.C: New test.
(cherry picked from commit 2f1691be517fcdcabae9cd671ab511eb0e08b1d5)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (16 preceding siblings ...)
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 10:39 ` jakub at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
2023-05-04 7:25 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-03 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[10/11 Regression] |[10 Regression]
|tbb-2021.8.0 fails on |tbb-2021.8.0 fails on
|i686-linux (32-bit), |i686-linux (32-bit),
|internal compiler error: in |internal compiler error: in
|expand_expr_real_1, at |expand_expr_real_1, at
|expr.c:10281 since |expr.c:10281 since
|r10-4511-g6cf67b62c8cda035d |r10-4511-g6cf67b62c8cda035d
|ccac |ccac
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 11.4 as well.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (17 preceding siblings ...)
2023-05-03 10:39 ` [Bug middle-end/108854] [10 " jakub at gcc dot gnu.org
@ 2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
2023-05-04 7:25 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-03 15:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
--- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f1789989ca265abaa246592cd4223cc3ca89b361
commit r10-11370-gf1789989ca265abaa246592cd4223cc3ca89b361
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Feb 24 11:05:27 2023 +0100
cgraphclones: Don't share DECL_ARGUMENTS between thunk and its artificial
thunk [PR108854]
The following testcase ICEs on x86_64-linux with -m32. The problem is
we create an artificial thunk and because of -fPIC, ia32 and thunk
destination which doesn't bind locally can't use a mi thunk.
The ICE is because during expansion to RTL we see SSA_NAME for a PARM_DECL,
but the PARM_DECL doesn't have DECL_CONTEXT of the current function.
This is because duplicate_thunk_for_node creates a new DECL_ARGUMENTS chain
only if some arguments need modification.
The following patch fixes it by copying the DECL_ARGUMENTS list even if
the arguments can stay as is, to update DECL_CONTEXT on them. While for
mi thunks it doesn't really matter because we don't use those arguments
in any way, for other thunks it is important.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/108854
* cgraphclones.c (duplicate_thunk_for_node): If no parameter
changes are needed, copy at least DECL_ARGUMENTS PARM_DECL
nodes and adjust their DECL_CONTEXT.
* g++.dg/opt/pr108854.C: New test.
(cherry picked from commit 2f1691be517fcdcabae9cd671ab511eb0e08b1d5)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/108854] [10 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
` (18 preceding siblings ...)
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
@ 2023-05-04 7:25 ` jakub at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-04 7:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.5 too.
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2023-05-04 7:25 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
2023-02-20 8:34 ` [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 rguenth at gcc dot gnu.org
2023-02-20 9:52 ` jakub at gcc dot gnu.org
2023-02-20 12:14 ` redi at gcc dot gnu.org
2023-02-20 23:31 ` pinskia at gcc dot gnu.org
2023-02-20 23:39 ` pinskia at gcc dot gnu.org
2023-02-21 17:00 ` gcc.gnu.org+lufm at davidak dot de
2023-02-21 18:32 ` jakub at gcc dot gnu.org
2023-02-22 9:40 ` slyfox at gcc dot gnu.org
2023-02-22 13:22 ` jakub at gcc dot gnu.org
2023-02-22 15:40 ` [Bug middle-end/108854] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
2023-02-23 15:55 ` [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac jakub at gcc dot gnu.org
2023-02-23 16:16 ` jakub at gcc dot gnu.org
2023-02-24 10:06 ` cvs-commit at gcc dot gnu.org
2023-02-24 10:07 ` [Bug middle-end/108854] [10/11/12 " jakub at gcc dot gnu.org
2023-03-19 5:29 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:27 ` [Bug middle-end/108854] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:39 ` [Bug middle-end/108854] [10 " jakub at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
2023-05-04 7:25 ` jakub 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).