Re: [PATCH] rs6000: suboptimal code for returning bool value on target ppc

2023-03-17 Thread Peter Bergner via Gcc-patches
On 3/17/23 4:20 PM, Peter Bergner via Gcc-patches wrote: > On 3/16/23 10:37 PM, Surya Kumari Jangala wrote: >> The issue of suboptimal code exists even for integer return value and not >> just bool return value. See >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103784#c9 >> So the patch would

Re: [PATCH] rs6000: Don't ICE when compiling the __builtin_vec_xst_trunc built-in [PR109178]

2023-03-17 Thread Peter Bergner via Gcc-patches
On 3/17/23 7:17 PM, Peter Bergner wrote: > On 3/17/23 5:35 PM, Peter Bergner wrote: >> When we expand the __builtin_vec_xst_trunc built-in, we use the wrong mode >> for the MEM operand which causes an unrecognizable insn ICE. The solution >> is to use the correct TMODE mode. >> >> Is this ok for

Re: [committed] libstdc++: Add const to hash>::operator() [PR109165]

2023-03-17 Thread Nathaniel Shead via Gcc-patches
On Sat, Mar 18, 2023 at 7:36 AM Jonathan Wakely via Libstdc++ wrote: > > Tested x86_64-linux. Pushed to trunk. gcc-12 backport needed too. > > -- >8 -- > > libstdc++-v3/ChangeLog: > > PR libstdc++/109165 > * include/std/coroutine (hash<>::operator()): Add const. > *

Re: [PATCH] rs6000: Don't ICE when compiling the __builtin_vec_xst_trunc built-in [PR109178]

2023-03-17 Thread Peter Bergner via Gcc-patches
On 3/17/23 5:35 PM, Peter Bergner wrote: > When we expand the __builtin_vec_xst_trunc built-in, we use the wrong mode > for the MEM operand which causes an unrecognizable insn ICE. The solution > is to use the correct TMODE mode. > > Is this ok for trunk and gcc12 assuming my bootstraps and

[committed] lra: Ignore debug insns and notes in combine_reload_insn [PR109179]

2023-03-17 Thread Peter Bergner via Gcc-patches
We ICE in combine_reload_insn if we've deleted the TO insn operand during processing, because lra_get_insn_recog_data doesn't expect to see the note that replaces the deleted insn. The solution here is to exit early if TO is a debug insn or note. This caused a bootstrap issue on

[pushed] c++: constant, array, lambda, template [PR108975]

2023-03-17 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- When a lambda refers to a constant local variable in the enclosing scope, we tentatively capture it, but if we end up pulling out its constant value, we go back at the end of the lambda and prune any unneeded captures. Here while parsing

[PATCH] rs6000: Don't ICE when compiling the __builtin_vec_xst_trunc built-in [PR109178]

2023-03-17 Thread Peter Bergner via Gcc-patches
When we expand the __builtin_vec_xst_trunc built-in, we use the wrong mode for the MEM operand which causes an unrecognizable insn ICE. The solution is to use the correct TMODE mode. Is this ok for trunk and gcc12 assuming my bootstraps and regtests show no regressions? Peter gcc/ PR

[PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

2023-03-17 Thread Harald Anlauf via Gcc-patches
Dear all, the Fortran standard requires an explicit procedure interface in certain situations, such as when they have a BIND(C) attribute (F2018:15.4.2.2). The attached patch adds a check for this. Regtested on x86_64-pc-linux-gnu. OK for mainline? The PR marks this as a long-time regression,

[pushed] c++: throw and private destructor [PR109172]

2023-03-17 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since we aren't going through the normal call machinery, we need to check the dtor access specifically. PR c++/109172 gcc/cp/ChangeLog: * except.cc (build_throw): Check dtor access. gcc/testsuite/ChangeLog: *

Re: [PATCH] rs6000: suboptimal code for returning bool value on target ppc

2023-03-17 Thread Peter Bergner via Gcc-patches
On 3/16/23 10:37 PM, Surya Kumari Jangala wrote: > The issue of suboptimal code exists even for integer return value and not > just bool return value. See > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103784#c9 > So the patch would need to take care of integer return values too. Correct.

[PATCH] json: preserve key-insertion order [PR109163]

2023-03-17 Thread David Malcolm via Gcc-patches
PR other/109163 notes that when we write out JSON files, we traverse the keys within each object via hash_map iteration, and thus the ordering is non-deterministic - it can arbitrarily vary from run to run and from different machines, making it harder for users to compare results and determine if

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Andrew Waterman via Gcc-patches
On Fri, Mar 17, 2023 at 6:16 AM Philipp Tomsich wrote: > > On Fri, 17 Mar 2023 at 09:31, Richard Biener > wrote: > > > > On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis > > wrote: > > > > > > For this C testcase: > > > > > > void g(); > > > void f(unsigned int *a) > > > { > > > if (++*a ==

[committed] libstdc++: Add const to hash>::operator() [PR109165]

2023-03-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. gcc-12 backport needed too. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/109165 * include/std/coroutine (hash<>::operator()): Add const. * testsuite/18_support/coroutines/hash.cc: New test. --- libstdc++-v3/include/std/coroutine

[PATCH] c++: further -Wdangling-reference refinement [PR107532]

2023-03-17 Thread Marek Polacek via Gcc-patches
Based on , it seems like we should treat *any* class with a reference member as a reference wrapper. This simplifies the code so I'm happy to make that change. The patch, however, does not suppress the warning in int i = 42; auto

Re: [PATCH] tree-optimization/106912 - IPA profile and pure/const

2023-03-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 17, 2023 at 08:40:34PM +0100, Jan Hubicka wrote: > > + /* Drop the const attribute from the call type (the pure > > + attribute is not available on types). */ > > + tree fntype = gimple_call_fntype (call); > > + if (fntype && TYPE_READONLY

Re: [PATCH] tree-optimization/106912 - IPA profile and pure/const

2023-03-17 Thread Jan Hubicka via Gcc-patches
> > The following is what I profile-bootstrapped and tested on > x86_64-unknown-linux-gnu. > > Richard. > > From d438a0d84cafced85c90204cba81de0f60ad0073 Mon Sep 17 00:00:00 2001 > From: Richard Biener > Date: Thu, 16 Mar 2023 13:51:19 +0100 > Subject: [PATCH] tree-optimization/106912 - clear

Re: [PATCH V4] Rework 128-bit complex multiply and divide.

2023-03-17 Thread Segher Boessenkool
Hi! On Thu, Mar 09, 2023 at 08:40:36PM -0500, Michael Meissner wrote: > PR target/109067 > * config/rs6000/rs6000.cc (create_complex_muldiv): Delete. > (init_float128_ieee): Delete code to switch complex multiply and divide > for long double. >

Re: [PATCH] tree-optimization/106912 - IPA profile and pure/const

2023-03-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 17, 2023 at 08:09:17PM +0100, Jan Hubicka wrote: > > > > I have in the meantime briefly tested following. > > > > But if you want to the above way, then at least the testcase could be > > useful. Though, not sure if the above is all that is needed. Shouldn't > > set_const_flag_1

Re: [PATCH] tree-optimization/106912 - IPA profile and pure/const

2023-03-17 Thread Jan Hubicka via Gcc-patches
> > I have in the meantime briefly tested following. > > But if you want to the above way, then at least the testcase could be > useful. Though, not sure if the above is all that is needed. Shouldn't > set_const_flag_1 upon TREE_READONLY (node->decl) = 0; also adjust > TREE_TYPE on the

[pushed] c++: namespace-scoped friend in local class [PR69410]

2023-03-17 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- do_friend was only considering class-qualified identifiers for the qualified-id case, but we also need to skip local scope when there's an explicit namespace scope. PR c++/69410 gcc/cp/ChangeLog: * friend.cc (do_friend):

Re: [PATCH] tree-inline: Fix up multiversioning with vector arguments [PR105554]

2023-03-17 Thread Richard Biener via Gcc-patches
> Am 17.03.2023 um 18:48 schrieb Jakub Jelinek : > > Hi! > > The following testcase ICEs, because we call tree_function_versioning from > old_decl which has target attributes not supporting V4DImode and so > DECL_MODE of DECL_ARGUMENTS is BLKmode, while new_decl supports those. >

[PATCH] c++: Drop TREE_READONLY on vars (possibly) initialized by tls wrapper [PR109164]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! The following two testcases are miscompiled, because we keep TREE_READONLY on the vars even when they are (possibly) dynamically initialized by a TLS wrapper function. Normally cp_finish_decl drops TREE_READONLY from vars which need dynamic initialization, but for TLS we do this kind of

[PATCH] tree-inline: Fix up multiversioning with vector arguments [PR105554]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs, because we call tree_function_versioning from old_decl which has target attributes not supporting V4DImode and so DECL_MODE of DECL_ARGUMENTS is BLKmode, while new_decl supports those. tree_function_versioning initially copies DECL_RESULT and DECL_ARGUMENTS from

Re: [PATCH] [rs6000] adjust return_pc debug attrs

2023-03-17 Thread Segher Boessenkool
On Fri, Mar 17, 2023 at 10:33:22AM -0600, Tom Tromey wrote: > > "Segher" == Segher Boessenkool writes: > > Segher> Yes. On most architectures you can get multiple machine instructions > of > Segher> course (for long calls for example), but on rs6000 (with some ABIs, in > Segher> some

Re: [PATCH] vect: Check that vector factor is a compile-time constant

2023-03-17 Thread Palmer Dabbelt
On Tue, 14 Mar 2023 10:48:24 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 2/23/23 21:04, Kito Cheng wrote: Hi Jeff: What I'd been planning to do internally at Ventana was to update our codebase to gcc-13 once it's released. Then I'd backport RVV autovec work from the gcc-14 dev tree into

Re: [PATCH] testsuite: Handle default_packed targets in gcc.dg/plugin

2023-03-17 Thread David Malcolm via Gcc-patches
On Fri, 2023-03-17 at 17:10 +0100, Hans-Peter Nilsson wrote: > > From: David Malcolm > > Date: Thu, 16 Mar 2023 14:42:58 -0400 > > > I think I prefer the top one-liner dg-skip-if approach you > > mentioned in > > your original email; it seems simplest. > > Ok then.  There's also a choice

Re: [PATCH] [rs6000] adjust return_pc debug attrs

2023-03-17 Thread Tom Tromey via Gcc-patches
> "Segher" == Segher Boessenkool writes: Segher> Yes. On most architectures you can get multiple machine instructions of Segher> course (for long calls for example), but on rs6000 (with some ABIs, in Segher> some circumstances) we generate a nop insn after calls, so that the Segher> linker

Re: [PATCH] testsuite: Handle default_packed targets in gcc.dg/plugin

2023-03-17 Thread Hans-Peter Nilsson via Gcc-patches
> From: David Malcolm > Date: Thu, 16 Mar 2023 14:42:58 -0400 > I think I prefer the top one-liner dg-skip-if approach you mentioned in > your original email; it seems simplest. Ok then. There's also a choice between adding a target-specifier (i.e. "{ target { ! default_packed } }") to the

Re: [PATCH] c++: NTTP constraint depending on outer args [PR109160]

2023-03-17 Thread Patrick Palka via Gcc-patches
On Fri, 17 Mar 2023, Patrick Palka wrote: > Here we're crashing during satisfaction for the NTTP 'C auto' from > do_auto_deduction ultimately because convert_template_argument / unify > don't pass all outer template arguments to do_auto_deduction, and during > satisfaction we need to know all

[PATCH] c++: NTTP constraint depending on outer args [PR109160]

2023-03-17 Thread Patrick Palka via Gcc-patches
Here we're crashing during satisfaction for the NTTP 'C auto' from do_auto_deduction ultimately because convert_template_argument / unify don't pass all outer template arguments to do_auto_deduction, and during satisfaction we need to know all arguments. While these callers do pass some outer

Re: [PATCH] c, ubsan: Instrument even shortened divisions [PR109151]

2023-03-17 Thread Marek Polacek via Gcc-patches
On Fri, Mar 17, 2023 at 09:14:04AM +0100, Jakub Jelinek wrote: > Hi! > > On the following testcase, the C FE decides to shorten the division because > it has a guarantee that INT_MIN / -1 division won't be encountered, the > first operand is widened from narrower unsigned and/or the second

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Jakub Jelinek wrote: > On Fri, Mar 17, 2023 at 01:55:51PM +, Richard Biener wrote: > > > Anyway, I think it is fine to implement __builtin_expect this way > > > for now, ERF_RETURNS_ARG will be more important for pointers, especially > > > if > > > we propagate something

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Andrew MacLeod via Gcc-patches
On 3/17/23 04:31, Richard Biener wrote: On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis wrote: For this C testcase: void g(); void f(unsigned int *a) { if (++*a == 1) g(); } GCC will currently emit a comparison with 1 by using the value of *a after the increment. This can be

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 17, 2023 at 01:55:51PM +, Richard Biener wrote: > > Anyway, I think it is fine to implement __builtin_expect this way > > for now, ERF_RETURNS_ARG will be more important for pointers, especially if > > we propagate something more than just maybe be/can't be/must be null. > > Don't

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, Mar 17, 2023 at 2:15 PM Philipp Tomsich wrote: > > On Fri, 17 Mar 2023 at 09:31, Richard Biener > wrote: > > > > On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis > > wrote: > > > > > > For this C testcase: > > > > > > void g(); > > > void f(unsigned int *a) > > > { > > > if (++*a ==

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Andrew MacLeod via Gcc-patches
On 3/17/23 08:59, Jakub Jelinek wrote: On Fri, Mar 17, 2023 at 12:53:48PM +, Richard Biener wrote: On Fri, 17 Mar 2023, Jakub Jelinek wrote: On Fri, Mar 17, 2023 at 01:18:32PM +0100, Richard Biener wrote: The following adds a missing range-op for __builtin_expect which helps

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Jakub Jelinek wrote: > On Fri, Mar 17, 2023 at 12:53:48PM +, Richard Biener wrote: > > On Fri, 17 Mar 2023, Jakub Jelinek wrote: > > > > > On Fri, Mar 17, 2023 at 01:18:32PM +0100, Richard Biener wrote: > > > > The following adds a missing range-op for __builtin_expect

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Philipp Tomsich
On Fri, 17 Mar 2023 at 09:31, Richard Biener wrote: > > On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis > wrote: > > > > For this C testcase: > > > > void g(); > > void f(unsigned int *a) > > { > > if (++*a == 1) > > g(); > > } > > > > GCC will currently emit a comparison with 1 by using

[pushed] [PR109052] LRA: Implement combining secondary memory reload and original insn

2023-03-17 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109052 The patch was successfully bootstrapped and tested on x86-64, i686, aarch64, and ppc64le. commit 57688950b9328cbb4a9c21eb3199f9132b5119d3 Author: Vladimir N. Makarov Date: Fri Mar 17 08:58:58 2023 -0400 LRA:

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 17, 2023 at 12:53:48PM +, Richard Biener wrote: > On Fri, 17 Mar 2023, Jakub Jelinek wrote: > > > On Fri, Mar 17, 2023 at 01:18:32PM +0100, Richard Biener wrote: > > > The following adds a missing range-op for __builtin_expect which > > > helps -Wuse-after-free to detect the case

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Jakub Jelinek wrote: > On Fri, Mar 17, 2023 at 01:18:32PM +0100, Richard Biener wrote: > > The following adds a missing range-op for __builtin_expect which > > helps -Wuse-after-free to detect the case a realloc original > > pointer is used when the result was NULL. > > > >

Re: [PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 17, 2023 at 01:18:32PM +0100, Richard Biener wrote: > The following adds a missing range-op for __builtin_expect which > helps -Wuse-after-free to detect the case a realloc original > pointer is used when the result was NULL. > > Bootstrap and regtest running on

[PATCH] tree-optimization/109170 - bogus use-after-free with __builtin_expect

2023-03-17 Thread Richard Biener via Gcc-patches
The following adds a missing range-op for __builtin_expect which helps -Wuse-after-free to detect the case a realloc original pointer is used when the result was NULL. Bootstrap and regtest running on x86_64-unknown-linux-gnu, OK? PR tree-optimization/109170 * gimple-range-op.cc

Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Andre Vieira (lists) wrote: > Hi Richard, > > I'm only picking this up now. Just going through your earlier comments and > stuff and I noticed we didn't address the situation with the gimple::build. Do > you want me to add overloaded static member functions to cover all >

Re: [PATCH] rs6000: suboptimal code for returning bool value on target ppc

2023-03-17 Thread Ajit Agarwal via Gcc-patches
Hello Jeff: On 16/03/23 8:18 pm, Jeff Law wrote: > > > On 3/16/23 04:11, Ajit Agarwal via Gcc-patches wrote: >> >> Hello Richard: >> >> On 16/03/23 3:22 pm, Richard Biener wrote: >>> On Thu, Mar 16, 2023 at 9:19 AM Ajit Agarwal wrote: On 16/03/23 1:44 pm, Richard Biener

Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-03-17 Thread Andre Vieira (lists) via Gcc-patches
Hi Richard, I'm only picking this up now. Just going through your earlier comments and stuff and I noticed we didn't address the situation with the gimple::build. Do you want me to add overloaded static member functions to cover all gimple_build_* functions, or just create one to replace

RE: [PATCH] libatomic: Fix SEQ_CST 128-bit atomic load [PR108891]

2023-03-17 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Wilco Dijkstra > Sent: Thursday, March 16, 2023 6:22 PM > To: GCC Patches > Cc: Richard Sandiford ; Kyrylo Tkachov > > Subject: Re: [PATCH] libatomic: Fix SEQ_CST 128-bit atomic load [PR108891] > > ping > > > From: Wilco Dijkstra > Sent: 23 February

Re: [PATCH] RISC-V: Fix bugs of internal tests.

2023-03-17 Thread Kito Cheng via Gcc-patches
Committed with git log tweak: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c413abed869e7e34a86855a015413418f3c6b595 On Mon, Mar 13, 2023 at 3:52 PM wrote: > > From: Ju-Zhe Zhong > > Co-authored-by: kito-cheng > Co-authored-by: kito-cheng > > This patch fixed a bunch of bugs reported by

Re: Re: [PATCH] RISC-V: Fix Bug 109092

2023-03-17 Thread Kito Cheng via Gcc-patches
Committed with commit log tweak: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02880e7803b19c357718abd2f0d567b4a761f318 On Wed, Mar 15, 2023 at 11:06 AM juzhe.zh...@rivai.ai wrote: > > Yes, I have write access. However, I am new to commit patch to GCC trunk. > I didn't figure out how to commit

Re: [PATCH] c, ubsan: Instrument even shortened divisions [PR109151]

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Jakub Jelinek wrote: > Hi! > > On the following testcase, the C FE decides to shorten the division because > it has a guarantee that INT_MIN / -1 division won't be encountered, the > first operand is widened from narrower unsigned and/or the second operand is > a constant

Re: [PATCH] testsuite: Fix up forwprop-39.c testcase [PR109145]

2023-03-17 Thread Richard Biener via Gcc-patches
On Fri, 17 Mar 2023, Jakub Jelinek wrote: > Hi! > > As written in the PR, newlib headers aren't C11 compliant in that they > don't define CMPLXF macro, and glibc before 2.16 doesn't define that > either. I think it is easier to use __builtin_complex directly, over > another patch which keeps

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-03-17 Thread Richard Biener via Gcc-patches
On Thu, Mar 16, 2023 at 4:27 PM Manolis Tsamis wrote: > > For this C testcase: > > void g(); > void f(unsigned int *a) > { > if (++*a == 1) > g(); > } > > GCC will currently emit a comparison with 1 by using the value > of *a after the increment. This can be improved by comparing > against

[PATCH] cgraphclones: Fix up target_clones cloning of functions with vector arguments [PR105554]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! multiple_target.cc is the only caller of create_version_clone_with_body which calls it with non-NULL target_attributes. The attributes are finalized soon after new_decl is created and then tree_function_versioning is called. This temporarily sets DECL_RESULT and DECL_ARGUMENTS of new_decl

[PATCH] testsuite: Fix up forwprop-39.c testcase [PR109145]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! As written in the PR, newlib headers aren't C11 compliant in that they don't define CMPLXF macro, and glibc before 2.16 doesn't define that either. I think it is easier to use __builtin_complex directly, over another patch which keeps including complex.h but defines CMPLXF if it isn't

[PATCH] c, ubsan: Instrument even shortened divisions [PR109151]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase, the C FE decides to shorten the division because it has a guarantee that INT_MIN / -1 division won't be encountered, the first operand is widened from narrower unsigned and/or the second operand is a constant other than all ones (in this case both are true). The

[committed] openmp: Fix up handling of doacross loops with noreturn body in loops [PR108685]

2023-03-17 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch fixes an ICE with doacross loops which have a single entry no exit body, at least one of the ordered > collapse loops isn't guaranteed to have at least one iteration and the whole doacross loop is inside some other loop. The OpenMP constructs aren't represented by struct