On Mon, Sep 11, 2023 at 03:21:54PM +0200, Tobias Burnus wrote:
> + if (TREE_STATIC (var))
> + {
> + if (allocator == NULL_TREE && allocator_loc == UNKNOWN_LOCATION)
> + error_at (loc, "% clause required for "
> +"static variable %qD", var);
> + e
Hi,
thanks for the comments and for the line-number thing. (I wanted to
re-check it myself but then totally forgot about it.)
Attached is the updated patch, fixing the line-number comparison, the
C++ addition to the enum decl in two of the testcases, and adding
"allocator" to the one inform (bot
On Mon, 2023-09-11 at 13:54 +0200, Jakub Jelinek wrote:
> Hi!
>
> One question to David below, CCed.
>
> On Mon, Sep 11, 2023 at 01:44:07PM +0200, Tobias Burnus wrote:
[...]
>
> > +
> > + if (DECL_SOURCE_LOCATION (allocator) >
> > DECL_SOURCE_LOCATION (var))
> > + {
> > +
Hi!
One question to David below, CCed.
On Mon, Sep 11, 2023 at 01:44:07PM +0200, Tobias Burnus wrote:
> --- a/gcc/c/c-decl.cc
> +++ b/gcc/c/c-decl.cc
> @@ -681,6 +681,11 @@ decl_jump_unsafe (tree decl)
>if (VAR_P (decl) && C_DECL_COMPOUND_LITERAL_P (decl))
> return false;
>
> + if (fl
The patch adds more check and fixes some minor FE bits, but it now has a
'sorry' for automatic/stack variables in the middle end.
I think it is useful by itself as it completes the C FE part and adds
diagnostic, even if the actual code generation is disabled.
Comments, remarks, suggestions?
The
Attached is an incremental patch to add diagnostic for the in-between
allocator issues, i.e.
On 30.08.23 12:47, Tobias Burnus wrote:
omp_allocator_handle_t uninit;
int var, var2;
uninit = omp_low_lat_mem_alloc;
omp_allocator_handle_t late_declared = omp_low_lat_mem_alloc;
#pragma omp alloc
On Wed, Aug 30, 2023 at 12:47:42PM +0200, Tobias Burnus wrote:
> > For switches, there is the case of the switch jumping across declaration
> > of an automatic var which is not initialized/constructed (I think in that
> > case there is normally no warning/error and happens a lot in the wild
> > inc
Revised patch included - addresses part of the issues:
* gimplify.cc: Fix placement of GOMP_alloc by really checking for
DECL_EXPR (experimented with it before but settled
for a different pattern)
* c/ Add it to has_jump_unsafe_decl similar to VLA
+ added msg to the switch/goto error handlin
On Tue, Aug 29, 2023 at 06:56:40PM +0200, Tobias Burnus wrote:
> On 29.08.23 18:28, Jakub Jelinek wrote:
> > One thing is that for C++ one needs to be careful about vars optimized
> > by NRV by the FE.
> Thanks for the warning.
> > And, just from the gimplify_bind_expr function name,
>
> (I forgot
On 29.08.23 18:28, Jakub Jelinek wrote:
One thing is that for C++ one needs to be careful about vars optimized
by NRV by the FE.
Thanks for the warning.
And, just from the gimplify_bind_expr function name,
(I forgot that one change in there which makes it look larger is that
I moved the stack
On Tue, Aug 29, 2023 at 06:12:58PM +0200, Tobias Burnus wrote:
> This adds support for
> #pragma omp allocate(var-list) [allocator(..) align(..)]
>
> While the spec permits stack and static variables, this patch only
> adds support for stack variables - keeping the 'sorry' for static
> variables
This adds support for
#pragma omp allocate(var-list) [allocator(..) align(..)]
While the spec permits stack and static variables, this patch only
adds support for stack variables - keeping the 'sorry' for static
variables.
It is also only C as I wanted to get this out before updating C++
parsin
12 matches
Mail list logo