Re: [PATCH][debug] Fix pre_dec handling in vartrack

2018-07-16 Thread Jakub Jelinek
On Mon, Jul 16, 2018 at 09:24:10AM +0200, Jakub Jelinek wrote: > On Sun, Jul 15, 2018 at 11:21:56PM +0200, Tom de Vries wrote: > > 2018-07-15 Tom de Vries > > > > * var-tracking.c (vt_initialize): Fix pre_dec handling. Print adjusted > > insn slim if

Re: [RFC][debug] Add -fadd-debug-nops

2018-07-16 Thread Jakub Jelinek
On Mon, Jul 16, 2018 at 03:29:10PM +0200, Tom de Vries wrote: > this is an idea that I'm currently playing around with: adding nops in > an optimized application with debug info can improve the debug info. > > Consider f.i. this gdb session in foo of pr54200-2.c (using -Os): > ... > (gdb) n > 26

[PATCH] Fix inline memcpy ICE (PR tree-optimization/86526)

2018-07-16 Thread Jakub Jelinek
there are within the TREE_STRING_LENGTH. The rest of the patch is just a temporary to avoid using as_a twice in each loop iteration, and lots of formatting fixes, mostly to avoid trailing whitespace. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-16 Jakub Jeline

[committed] Fix OpenMP taskloop handling of reference temporaries (PR middle-end/86539)

2018-07-17 Thread Jakub Jelinek
initializing that temporary from the orig reference and initializing the new private reference to the address of the int temporary. So, the following code ensures that the temporary we firstprivatize has the right type. Bootstrapped/regtested on x86_64-linux and i686-linux, queued for backporting.

Re: [PATCH][debug] Fix pre_dec handling in vartrack

2018-07-17 Thread Jakub Jelinek
On Tue, Jul 17, 2018 at 11:17:33AM +0200, Rainer Orth wrote: > it turns out the test FAILs on i386-pc-soalris2.11 with -m64: the dump > doesn't even contain argp: However, adding -fomit-frame-pointer makes > it work, and still PASSes on x86_64-pc-linux-gnu. > > Ok for for mainline? Ok, thanks.

[committed] Fix OpenMP taskloop lowering (PR middle-end/86542)

2018-07-17 Thread Jakub Jelinek
cpyfn the default memcpy that copies the passed in data to the task arg area handles that already. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk, queued for backports. 2018-07-17 Jakub Jelinek PR middle-end/86542 * omp-low.c (create_t

Re: [PATCH] Fix error level of warning about C++ style comments

2018-07-17 Thread Jakub Jelinek
On Tue, Jul 17, 2018 at 07:51:42AM -0700, Jason Franklin wrote: > Greetings, > > Below is a simple patch for fixing the error level of an additional note > that follows a warning about using C++ style comments. The ChangeLog > entry is below, followed by the patch. > > Tried to figure out how

Re: [PATCH] Fix error level of warning about C++ style comments

2018-07-17 Thread Jakub Jelinek
86_64-linux and i686-linux and committed to trunk: 2018-07-17 Jason Franklin Jakub Jelinek * lex.c (_cpp_lex_direct): Use CPP_DL_NOTE instead of CPP_DL_PEDWARN, CPP_DL_WARNING or CPP_DL_ERROR for note that diagnostics for C++ style comments is reported on

[C++ PATCH] Disallow type specifiers among lambda-declarator decl-specifier-seq (PR c++/86550)

2018-07-17 Thread Jakub Jelinek
_CONSTEXPR as it allows mutable, constexpr and type specifiers. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-17 Jakub Jelinek PR c++/86550 * parser.c (cp_parser_decl_specifier_seq): Don't parse a type speci

Re: [C++ PATCH] Disallow type specifiers among lambda-declarator decl-specifier-seq (PR c++/86550)

2018-07-18 Thread Jakub Jelinek
On Wed, Jul 18, 2018 at 11:34:30AM +1000, Jason Merrill wrote: > On Wed, Jul 18, 2018 at 4:57 AM, Jakub Jelinek wrote: > > The standard says: > > "In the decl-specifier-seq of the lambda-declarator, each decl-specifier > > shall > > either be mutable or co

[C++ PATCH] Hide __for_{range,begin,end} symbols (PR c++/85515, take 2)

2018-07-18 Thread Jakub Jelinek
On Fri, Jul 13, 2018 at 06:53:30PM +0200, Jakub Jelinek wrote: > On Fri, Jul 13, 2018 at 12:24:02PM -0400, Nathan Sidwell wrote: > > On 07/13/2018 09:49 AM, Jakub Jelinek wrote: > > > Hi! > > > > > > I'd like to ping the following C++ patches: > >

[gomp5] Add support for C++ range for loops in #pragma omp {distribute,for,simd,taskloop}

2018-07-18 Thread Jakub Jelinek
Hi! This patch adds support for C++ range for loops, including range for loops with structured bindings for OpenMP constructs. Tested on x86_64-linux, committed to gomp-5_0-branch. 2018-07-18 Jakub Jelinek gcc/ * tree.h (OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE): Define

[C++ PATCH] Further get_identifier ("string literal") C++ FE caching

2018-07-18 Thread Jakub Jelinek
On Wed, Jul 18, 2018 at 12:19:31PM +0200, Jakub Jelinek wrote: > Shall I submit an incremental patch for the "abi_tag", "gnu", "begin", "end", > "get", > "tuple_size", "tuple_element" etc. identifiers? Here it is

Re: [C++ PATCH] Further get_identifier ("string literal") C++ FE caching

2018-07-18 Thread Jakub Jelinek
On Wed, Jul 18, 2018 at 06:00:20PM -0400, Nathan Sidwell wrote: > So cool! Thanks. Ok for both patches or just this one? Jakub

Re: [PATCH] i386: Define __HAVE_INDIRECT_RETURN_ATTRIBUTE__

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 04:21:26AM -0700, H.J. Lu wrote: > The new indirect_return attribute is intended to mark swapcontext in > . This patch defines __HAVE_INDIRECT_RETURN_ATTRIBUTE__ > so that it can be used checked before using indirect_return attribute > in . It works when the indirect_retur

Re: [PATCH] i386: Define __HAVE_INDIRECT_RETURN_ATTRIBUTE__

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 01:39:04PM +0200, Florian Weimer wrote: > On 07/19/2018 01:33 PM, Jakub Jelinek wrote: > > On Thu, Jul 19, 2018 at 04:21:26AM -0700, H.J. Lu wrote: > > > The new indirect_return attribute is intended to mark swapcontext in > >

Re: [PATCH] i386: Define __HAVE_INDIRECT_RETURN_ATTRIBUTE__

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 01:54:46PM +0200, Florian Weimer wrote: > On 07/19/2018 01:48 PM, H.J. Lu wrote: > > Both __has_attribute (indirect_return) and __has_attribute > > (__indirect_return__) > > work here. > > Applications can have > > #define indirect_return > > so the variant without under

Re: [PATCH] Merge Ignore and Deprecated in .opt files.

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 03:25:15PM +0200, Martin Liška wrote: > Few weeks ago I added new Deprecated flag for options. Apparently, there's > one similar called Ignore. Thus I moved all Deprecated to Ignore and for > all Ignored I do a warning of following format: > > $ xgcc: warning: switch ‘-mmpx

Re: [PATCH] Merge Ignore and Deprecated in .opt files.

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 04:16:10PM +0200, Martin Liška wrote: > I must admit that was my intention :) In my eyes it makes it more consistent > and > it gives consumers feedback about usage of an option that does nothing. > For x86_64 there's list of options that are Ignore and don't produce a > w

Re: [PATCH][Middle-end]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 11:49:16AM -0500, Qing Zhao wrote: > As Wilco mentioned in PR78809 after I checked in the last part of > implementation of inline strcmp: > > See http://www.iso-9899.info/n1570.html > section 7.24.4: > > "The sign of a nonzero value returned by the comparison functions

Re: [PATCH][Middle-end]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-19 Thread Jakub Jelinek
On Thu, Jul 19, 2018 at 02:06:16PM -0500, Qing Zhao wrote: > > If you expand it as (int) ((unsigned char *)p)[n] - (int) ((unsigned char > > *)q)[n] > > then aren't you relying on int type to have wider precision than unsigned > > char > > (or unit_mode being narrower than mode)? > > do you impl

Re: [PATCH][Middle-end][version 2]change char type to unsigned char type when expanding strcmp/strncmp

2018-07-20 Thread Jakub Jelinek
On Fri, Jul 20, 2018 at 09:53:24AM -0500, Qing Zhao wrote: > +2018-07-20 Qing Zhao > + > + * builtins.c (expand_builtin_memcmp): Delete the last parameter for > + call to inline_expand_builtin_string_cmp. > + (expand_builtin_strcmp): Likewise. > + (expand_builtin_strncmp)

[C++ PATCH] Avoid code generation changes with -Wnonnull-compare vs. -Wno-nonnull-compare (PR c++/86569)

2018-07-22 Thread Jakub Jelinek
the warning options, the GIMPLE optimizers can handle it fine (but it makes a difference with -O0). Bootstrapped/regtested on x86_64-linux (only, i686-linux bootstrap is broken), ok for trunk? 2018-07-22 Jakub Jelinek PR c++/86569 * cp-gimplify.c (cp_fold): Don't fold compar

[C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-22 Thread Jakub Jelinek
o me if in case the condition includes std::is_constant_evaluated () call we need to fold it also to true or not depending on what will we be evaluating later on. Bootstrapped/regtested on x86_64-linux. 2018-07-22 Jakub Jelinek P0595R1 - is_constant_evaluated * builtins.def (BUILT_I

Re: [PATCH] fix a couple of bugs in const string folding (PR 86532)

2018-07-23 Thread Jakub Jelinek
On Sun, Jul 22, 2018 at 04:47:45PM -0600, Martin Sebor wrote: > > No, I mean something like: > > > > $ cat y.c > > const char a[2][3] = { "1234", "xyz" }; > > char b[6]; > > > > int main () > > { > >__builtin_memcpy(b, a, 4); > >__builtin_memset(b + 4, 'a', 2); > >__builtin_printf("%.

Re: [PATCH] specify large command line option arguments (PR 82063)

2018-07-23 Thread Jakub Jelinek
On Sun, Jul 22, 2018 at 04:43:17PM -0600, Martin Sebor wrote: > > > > OK with the nit fixed. IF you need to update the doc changes as a > > > > result of the -faligned-* changes, those are pre-approved. > > > > > > > > > I had to adjust a few more tests and make a couple of minor > > > tweaks as

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-07-23 Thread Jakub Jelinek
On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > > Bootstrapped/regtested on x86_64-linux. > > Thanks for working on this. I wonder if we can completely hide this > from the middle-end, without requiring defining of c_dialect_cxx. > There is the BUILT_IN_FRONTEND class so you cou

[PATCH] Fix expand_divmod (PR middle-end/86627)

2018-07-24 Thread Jakub Jelinek
trapped/regtested on x86_64-linux and i686-linux, ok for trunk and release branches? 2018-07-24 Jakub Jelinek PR middle-end/86627 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT

[C PATCH] Fix endless loop in the C FE initializer handling (PR c/85704)

2018-07-24 Thread Jakub Jelinek
IELD_DECLs that would allow finding out the FIELD_DECL chain ordering instantly. Not all FIELD_DECLs are ordered though (e.g. C++ ones I think) and we don't have bits to spare in tree_field_decl. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and release branches? 2018-07

[PATCH] Fix up pr19476-{1,5}.C (PR testsuite/86649)

2018-07-24 Thread Jakub Jelinek
-fconcepts scan-tree-dump ccp1 "return 42" === g++ Summary for unix/-Wnonnull-compare === # of expected passes60 # of unexpected failures12 Especially for -O2 that people use most, folding it at evrp time seems to be early enough for me. Fixed by testing

Re: [PATCH] Fix up pr19476-{1,5}.C (PR testsuite/86649)

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 12:08:35PM +0200, Richard Biener wrote: > OK - can you add a variant with -O2 that tests it at EVRP time then? Here is what I've committed to trunk then: 2018-07-24 Jakub Jelinek PR testsuite/86649 * g++.dg/tree-ssa-/pr19476-1.C: Check d

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 12:29:37PM +0200, Tom de Vries wrote: > > I wonder if it makes sense to disambiguate things from the gcc side > > by generating an empty location description for known optimized out > > values (the standard seems to explicitely call that out as a way to > > say "optimized ou

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 01:37:32PM +0200, Tom de Vries wrote: > Another drawback is that the fake uses confuse the unitialized warning > analysis, so that is switched off for -fkeep-vars-live. Is that really needed? I.e. can't you for the purpose of uninitialized warning analysis ignore the clobb

Re: [PATCH][debug] Handle references to skipped params in remap_ssa_name

2018-07-24 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 04:33:30PM +0200, Richard Biener wrote: > DW_OP_GNU_variable_value you mean. That's true. But I was talking about Sure. > omitting DW_AT_upper_bound which would correspond to int[] vs. > a empty location list DW_AT_upper_bound which would correspond to > int[]. I think

Re: [RFC 2/3, debug] Add fkeep-vars-live

2018-07-25 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 04:11:11PM -0300, Alexandre Oliva wrote: > On Jul 24, 2018, Tom de Vries wrote: > > > This patch adds fake uses of user variables at the point where they go out > > of > > scope, to keep user variables inspectable throughout the application. > > I suggest also adding suc

Re: [PATCH, debug] Add fkeep-vars-live

2018-07-25 Thread Jakub Jelinek
On Tue, Jul 24, 2018 at 05:04:06PM +0200, Tom de Vries wrote: > > > +Add artificial use for each local variable at the end of the > > declaration scope > > Is this a better option description? Yes (with a period at the end). Or perhaps "its" instead of "the". Looks ok to me, just would like to

Re: [PATCH] treat -Wxxx-larger-than=HWI_MAX special (PR 86631)

2018-07-25 Thread Jakub Jelinek
On Wed, Jul 25, 2018 at 08:54:13AM -0600, Martin Sebor wrote: > I don't mean for the special value to be used except internally > for the defaults. Otherwise, users wanting to override the default > will choose a value other than it. I'm happy to document it in > the .opt file for internal users

[gomp5] Add host teams construct support

2018-07-25 Thread Jakub Jelinek
NUMA system); if users specify something smaller or larger, there are various options and we need to figure out what is best for users), I'll change it to the final implementation. Tested on x86_64-linux, committed to gomp-5_0-branch. 2018-07-25 Jakub Jelinek * gimple.h (enum gf

[wwwdocs] Repeat the 8.2 C++ ABI change also in the 8.2 changes.html section

2018-07-26 Thread Jakub Jelinek
Hi! I've noticed that while Jason documented the -fabi-version=13/-Wabi=12 8.2 fix in the C++ section, there is no mention of it in the 8.2 section, so if people just quickly look at what significant has changed in 8.2, they will not notice that. This patch fixes the markup in Jason's changes et

Re: PING [PATCH] libsanitizer: Mark REAL(swapcontext) with indirect_return attribute on x86

2018-07-26 Thread Jakub Jelinek
On Thu, Jul 26, 2018 at 07:38:34AM -0700, H.J. Lu wrote: > > PR target/86560 > > * asan/asan_interceptors.cc (swapcontext): Call REAL(swapcontext) > > with indirect_return attribute on x86 if indirect_return attribute > > is available. > > * sanitizer_common/

[committed] Don't ignore OpenMP map clauses for declare target to vars if there is always modifier (PR middle-end/86660)

2018-07-26 Thread Jakub Jelinek
more work we could keep using the device var directly. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk and 8.3. 2018-07-26 Jakub Jelinek PR middle-end/86660 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for declare

[committed] Partial fix for for-15.C (PR middle-end/86660)

2018-07-26 Thread Jakub Jelinek
ue to exceptions, but that is something to be fixed in the nvptx backend (sure, we could add -fno-exceptions temporarily though for nvptx offloading only). 2018-07-26 Jakub Jelinek PR testsuite/86660 * testsuite/libgomp.c++/for-15.C (results): Include it in omp declare target r

Backports to 8.3

2018-07-26 Thread Jakub Jelinek
Hi! I've backported 4 commits of mine to gcc-8-branch, after bootstrapping/regtesting them on x86_64-linux and i686-linux. Jakub 2018-07-26 Jakub Jelinek Backported from mainline 2018-07-10 Jakub Jelinek PR fortran/86421 * mod

[gomp5] Add omp_pause_resource{,_all} support

2018-07-27 Thread Jakub Jelinek
efore pthread_exit). With this people can e.g. omp_pause_resource_all (omp_pause_soft); and then use fork () in a process that uses pthreads only inside of libgomp and have a chance to use OpenMP in the fork child. Tested on x86_64-linux, committed to gomp-5_0-branch. 2018-07-27 Jakub Je

[C++2A] Implement P1008R1 - prohibit aggregates with user-declared constructors

2018-07-30 Thread Jakub Jelinek
Hi! Seems what is considered an aggregate type keeps changing in every single C++ version. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-07-27 Jakub Jelinek P1008R1 - prohibit aggregates with user-declared constructors * class.c

Re: [PATCH] Move -Walloca and related warnings from c.opt to common.opt

2018-07-30 Thread Jakub Jelinek
On Sun, Jul 29, 2018 at 08:35:39PM +0200, Iain Buclaw wrote: > Since r262910, it was noticed that new -Walloca-larger-than= warnings > started appearing when building the D frontend's standard library. > These have been checked and verified as valid, and appropriate fixes > will be sent on upstream

Re: [PATCH] Fix the damage done by my other patch from yesterday to strlenopt-49.c

2018-07-30 Thread Jakub Jelinek
On Mon, Jul 30, 2018 at 03:52:39PM +, Joseph Myers wrote: > On Mon, 30 Jul 2018, Bernd Edlinger wrote: > > > In the moment I would already be happy if all STRING_CSTs would > > be zero terminated. > > generic.texi says they need not be. Making the STRING_CST contain only > the bytes of the

Re: [PATCH] Fix the damage done by my other patch from yesterday to strlenopt-49.c

2018-07-30 Thread Jakub Jelinek
On Mon, Jul 30, 2018 at 04:28:50PM +, Bernd Edlinger wrote: > >>> generic.texi says they need not be. Making the STRING_CST contain only > >>> the bytes of the initializer and not the trailing NUL in the C case where > >>> the trailing NUL does not fit in the object initialized would of course

Re: [PATCH] Fix wrong code with truncated string literals (PR 86711/86714)

2018-07-30 Thread Jakub Jelinek
On Mon, Jul 30, 2018 at 10:01:38PM -0600, Martin Sebor wrote: > > We do not want to change what is currently accepted by the > > front end. period. > > On whose behalf are you making such categorical statements? > It was Jakub and Richard's suggestion in bug 86714 to reject > the undefined excessi

Re: [PATCH] Make strlen range computations more conservative

2018-07-30 Thread Jakub Jelinek
On Mon, Jul 30, 2018 at 09:45:49PM -0600, Martin Sebor wrote: > Even without _FORTIFY_SOURCE GCC diagnoses (some) writes past > the end of subobjects by string functions. With _FORTIFY_SOURCE=2 > it calls abort. This is the default on popular distributions, Note that _FORTIFY_SOURCE=2 is the mod

Patch ping (Re: [C PATCH] Fix endless loop in the C FE initializer handling (PR c/85704))

2018-07-31 Thread Jakub Jelinek
Hi! On Tue, Jul 24, 2018 at 10:57:56AM +0200, Jakub Jelinek wrote: > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and > release branches? > > 2018-07-24 Jakub Jelinek > > PR c/85704 > * c-typeck.c (field_de

Re: [PATCH] Make strlen range computations more conservative

2018-07-31 Thread Jakub Jelinek
On Tue, Jul 31, 2018 at 09:17:52AM -0600, Martin Sebor wrote: > On 07/31/2018 12:38 AM, Jakub Jelinek wrote: > > On Mon, Jul 30, 2018 at 09:45:49PM -0600, Martin Sebor wrote: > > > Even without _FORTIFY_SOURCE GCC diagnoses (some) writes past > > > the end of subobjects

Re: [C PATCH] Fix endless loop in the C FE initializer handling (PR c/85704)

2018-07-31 Thread Jakub Jelinek
On Tue, Jul 31, 2018 at 08:04:58PM +, Joseph Myers wrote: > On Tue, 24 Jul 2018, Jakub Jelinek wrote: > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and > > release branches? > > > > 2018-07-24 Jakub Jelinek > > >

Re: [PATCH] Make strlen range computations more conservative

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 09:19:43AM +0200, Richard Biener wrote: > > And if so, what makes it well defined? > > The fact that strlen takes a char * argument and thus inline-expansion > of a trivial implementation like > > int len = 0; > for (; *p; ++p) >++len; > > will have > > p = &s.a;

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 09:48:50AM +0100, Richard Earnshaw (lists) wrote: > Sorry about that, I did run a full bootstrap on x86, but I had the x86 > mitigation patch applied, so it didn't trip this. Also, I see FAIL: c-c++-common/spec-barrier-1.c -Wc++-compat (test for excess errors) FAIL: c-c++

Re: [C++ PATCH] Implement P0595R1 - so far as __builtin_is_constant_evaluated rather than std::is_constant_evaluated magic builtin

2018-08-01 Thread Jakub Jelinek
On Wed, Aug 01, 2018 at 12:35:09AM +1000, Jason Merrill wrote: > On Mon, Jul 23, 2018 at 8:50 PM, Richard Biener > wrote: > > On Mon, Jul 23, 2018 at 12:28 PM Jakub Jelinek wrote: > >> > >> On Mon, Jul 23, 2018 at 12:17:42PM +0200, Richard Biener wrote: > >&g

Re: [PATCH] ABOUT-GCC-NLS: add usage guidance

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 12:13:55PM -0400, Jason Merrill wrote: > How about this? > > In general, use no markup for strings that are the immediate format string > argument of a diagnostic function. Use G_("str") for strings that will be > used as the format string for a diagnostic but are e.g.

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 09:05:38PM +, waffl3x wrote: > Okay so taking what you guys are saying here it sounds like it would be > appropriate to refactor the code I was reluctant to refactor. The code > (in grokfndecl) conditionally selects one of the two (now three with my > changes) following

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2023 at 09:31:06PM +, waffl3x wrote: > Ah alright, I see what you're saying, I see what the difference is now. > It's a shame we can't have the translated string insert a %s and format > into that :^). Ah well, I guess this code is just doomed to look poor > then, what can you d

Re: [patch] libgomp.texi: Update "Enabling OpenMP"

2023-10-20 Thread Jakub Jelinek
On Sat, Oct 14, 2023 at 11:57:39PM +0200, Jakub Jelinek wrote: > On Sat, Oct 14, 2023 at 03:46:52PM -0600, Sandra Loosemore wrote: > > On 10/14/23 13:43, Tobias Burnus wrote: > > > When browsing libgomp doc, I came across > > > https://gcc.gnu.org/onlinedocs/libgomp/Enab

Re: [PATCH] c++: Implement C++26 P2361R6 - Unevaluated strings [PR110342]

2023-10-20 Thread Jakub Jelinek
On Fri, Oct 20, 2023 at 04:12:48PM -0400, Jason Merrill wrote: > On 8/24/23 09:58, Jakub Jelinek wrote: > > The following patch implements C++26 unevaluated-string. > > As it seems to me just extra pedanticity, it is implemented only for > > -std=c++26 or -std=gnu++26

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-25 Thread Jakub Jelinek
On Wed, Oct 25, 2023 at 07:03:43PM +, Qing Zhao wrote: > For the code generation impact: > > turning the original x.buf > to a builtin function call > __builtin_with_access_and_size(x,buf, x.L,-1) > > might inhibit some optimizations from happening before the builtin is > evaluated into obj

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-02 Thread Jakub Jelinek
On Wed, Nov 01, 2023 at 11:15:56PM +, waffl3x wrote: > Just want to quickly check, when is the cutoff for GCC14 exactly? I Nov 18th EOD. But generally it is cutoff for posting new feature patches that could be accepted, patches posted before the deadline if reviewed soon after the deadline st

Re: [PATCH] c++: Implement C++26 P1854R4 - Making non-encodable string literals ill-formed [PR110341]

2023-11-02 Thread Jakub Jelinek
On Fri, Oct 27, 2023 at 07:05:34PM -0400, Jason Merrill wrote: > > --- gcc/testsuite/g++.dg/cpp26/literals1.C.jj 2023-08-25 > > 17:23:06.662878355 +0200 > > +++ gcc/testsuite/g++.dg/cpp26/literals1.C 2023-08-25 17:37:03.085132304 > > +0200 > > @@ -0,0 +1,65 @@ > > +// C++26 P1854R4 - Makin

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 08:57:36AM +0100, Richard Biener wrote: > You probably want to specify that when a pointer to the array is taken the > pointer has to be to the first array element (or do we want to mangle the > 'size' accordingly for the instrumentation?). You also want to specify that > t

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 11:18:09AM +0100, Richard Biener wrote: > > Or, if we want to pay further price, .ACCESS_WITH_SIZE could take as one of > > the arguments not the size value, but its address. Then at __bdos time > > we would dereference that pointer to get the size. > > So, > > struct S { i

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Thu, Nov 02, 2023 at 12:52:50PM +0100, Richard Biener wrote: > > What I meant is to emit > > tmp_4 = .ACCESS_WITH_SIZE (&s.b[0], &s.a, (typeof (&s.a)) 0); > > p_5 = &tmp_4[2]; > > i.e. don't associate the pointer with a value of the size, but with > > an address where to find the size (plus how

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-02 Thread Jakub Jelinek
On Fri, Nov 03, 2023 at 07:07:36AM +0100, Martin Uecker wrote: > Am Donnerstag, dem 02.11.2023 um 17:28 -0700 schrieb Bill Wendling: > > On Thu, Nov 2, 2023 at 1:36 PM Qing Zhao wrote: > > > > > > Thanks a lot for raising these issues. > > > > > > If I understand correctly, the major question w

Re: Skip a number of C++ test cases for '-fno-exceptions' testing (was: Support in the GCC(/C++) test suites for '-fno-exceptions')

2023-11-03 Thread Jakub Jelinek
On Fri, Nov 03, 2023 at 12:03:06PM +0100, Thomas Schwinge wrote: > --- a/gcc/testsuite/g++.dg/cpp0x/catch1.C > +++ b/gcc/testsuite/g++.dg/cpp0x/catch1.C > @@ -1,5 +1,6 @@ > // PR c++/53371 > // { dg-do compile { target c++11 } } > +// Explicit { dg-require-effective-target exceptions_enabled } to

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-03 Thread Jakub Jelinek
On Fri, Nov 03, 2023 at 02:32:04PM +, Qing Zhao wrote: > > Why? It doesn't really matter. The options are > > A. p is at &s.b[2] associated with &s.a and int type (or size of int > > or whatever); .ACCESS_WITH_SIZE can't be pure, > > .ACCESS_WITH_SIZE will only load the size from its addre

Re: RFC: the proposal to resolve the missing dependency issue for counted_by attribute

2023-11-03 Thread Jakub Jelinek
On Fri, Nov 03, 2023 at 04:20:57PM +, Qing Zhao wrote: > So, based on the discussion so far, We will define the .ACCESS_WITH_SIZE as > following: > > .ACCESS_WITH_SIZE (REF_TO_OBJ, REF_TO_SIZE, ACCESS_MODE) > > INTERNAL_FN (ACCESS_WITH_SIZE, ECF_LEAF | ECF_NOTHROW, NULL) > > which returns

[PATCH] c++, v2: Implement C++26 P1854R4 - Making non-encodable string literals ill-formed [PR110341]

2023-11-03 Thread Jakub Jelinek
stics spell it that way (I know the C++ standard doesn't use the hyphen). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-11-03 Jakub Jelinek PR c++/110341 libcpp/ * charset.cc: Implement C++ 26 P1854R4 - Making non-encodable string l

[PATCH] attribs: Fix ICE with -Wno-attributes= [PR112339]

2023-11-03 Thread Jakub Jelinek
Wno-attributes=gnu:: -Wno-attributes=gnu::foobarbaz). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-11-03 Jakub Jelinek PR c/112339 * attribs.cc (attribute_ignored_p): Only return true for attr_namespace_ignored_p if as is NULL. (de

[committed] openmp: Add support for omp::directive and omp::sequence attributes in C2X

2023-11-04 Thread Jakub Jelinek
Hi! The following patch adds support for attribute syntax which we have in C++11 and above since GCC 12 also for C, where OpenMP standard is going to add it in OpenMP 6.0. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-11-04 Jakub Jelinek gcc/c/ * c

[committed] openmp: Add omp::decl support for C2X

2023-11-04 Thread Jakub Jelinek
Hi! This patch adds omp::decl support which has been added recently for C++ also to C. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-11-04 Jakub Jelinek * c-parser.h (c_maybe_parse_omp_decl): Declare. * c-parser.cc (struct c_parser): Add

[committed] openmp: Adjust handling of __has_attribute (omp::directive)/sequence and add omp::decl

2023-11-05 Thread Jakub Jelinek
Hi! I forgot to tweak c_common_has_attribute for the C++ omp::decl addition and now also for the C omp::{directive,sequence,decl} addition. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-11-05 Jakub Jelinek * c-lex.cc (c_common_has_attribute): Return

[committed] openmp: Mention C attribute syntax in documentation

2023-11-05 Thread Jakub Jelinek
Hi! This patch mentions the C attribute syntax support in the libgomp documentation. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2023-11-05 Jakub Jelinek * libgomp.texi (Enabling OpenMP): Adjust wording for attribute syntax supported also in C

[PATCH] c++: Fix error recovery ICE [PR112365]

2023-11-05 Thread Jakub Jelinek
cause SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD asserts DECL_BIT_FIELD. The patch skips that for FIELD_DECLs with error_mark_node, another option would be to check DECL_BIT_FIELD in addition to DECL_C_BIT_FIELD. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-11-05 Jakub Jelinek

Re: [PATCH] libstdc++/112351 - deal with __gthread_once failure during locale init

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 11:52:08AM +, Richard Biener wrote: > The following makes the C++98 locale init path follow the way the > C++11 performs initialization. This way we deal with pthread_once > failing, falling back to non-threadsafe initialization which, given we > initialize from the lib

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: > Future changes will treat some C front end warnings similar to > -Wnarrowing. > > gcc/ > > * doc/invoke.texi (Warning Options): Mention C diagnostics > for -fpermissive. > > gcc/c-family/ > > * c.opt (fpermissiv

Re: [PATCH v2] c-family: Enable -fpermissive for C and ObjC

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 03:19:32PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > On Mon, Nov 06, 2023 at 03:06:39PM +0100, Florian Weimer wrote: > >> Future changes will treat some C front end warnings similar to > >> -Wnarrowing. > >> > >&g

Re: [PATCH] Avoid undeclared use of abort in gcc.dg/cpp/wchar-1.c

2023-11-06 Thread Jakub Jelinek
On Mon, Nov 06, 2023 at 06:38:04PM +0100, Florian Weimer wrote: > This should be safe because this is a preprocessor test; it > should not exercise implicit function declarations. > > * gcc.dg/cpp/wchar-1.c (main): Call __builtin_abort instead of > abort. Ok. > diff --git a/gcc/tests

[RFC C++ PATCH] OpenMP declare variant for C++

2019-10-23 Thread Jakub Jelinek
. Does this look reasonable to you? 2019-10-23 Jakub Jelinek * cp-tree.h (omp_declare_variant_finalize, build_local_temp): Declare. * decl.c (declare_simd_adjust_this): Add forward declaration. (omp_declare_variant_finalize_one, omp_declare_variant_finalize): New

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2019 at 11:37:26AM -0500, Segher Boessenkool wrote: > On Wed, Oct 23, 2019 at 07:22:47PM +0300, Alexander Monakov wrote: > > On Wed, 23 Oct 2019, Eduard-Mihai Burtescu wrote: > > > @@ -384,6 +384,14 @@ rust_demangle_callback (const char *mangled, int > > > options, > > > r

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2019 at 12:19:10PM -0500, Segher Boessenkool wrote: > I of course know that for e.g. strcmp or strlen we need to be careful of > page crossings; but this is strncmp, which has a size argument saying the > size of the array objects of its arguments! https://pubs.opengroup.org/online

Re: Make ipa-reference bitmaps dense

2019-10-23 Thread Jakub Jelinek
On Wed, Oct 23, 2019 at 08:20:12PM +0200, Jan Hubicka wrote: > Hi, > this is variant of patch I comitted. It additionally register variable > removal hook to be sure that we do not mix up the static variable for > some other decl allocated later. > > Bootstrapped/regtested x86_64 This doesn't bu

[C++ PATCH] Fix a C++17/20 regression on indirect function calls (PR c++/92201)

2019-10-23 Thread Jakub Jelinek
. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk and 9.3? 2019-10-23 Jakub Jelinek PR c++/92201 * cp-gimplify.c (cp_gimplify_expr): If gimplify_to_rvalue changes the function pointer type, re-add cast to the original one. * g++.dg/other/pr92

[C++ PATCH] P0784R7 constexpr new fixes (PR c++/91369)

2019-10-24 Thread Jakub Jelinek
to construct it again? 2019-10-24 Jakub Jelinek PR c++/91369 - Implement P0784R7: constexpr new * constexpr.c (cxx_replaceable_global_alloc_fn): Don't return true for placement new. (cxx_placement_new_fn, is_std_construct_at): New functions. (cxx_eval_

Re: [C++ PATCH] Implement P1073R3: Immediate functions (PR c++/88335)

2019-10-24 Thread Jakub Jelinek
does something much simpler in that case, but I believe we still need to evaluate consteval calls even if processing_template_decl if they aren't dependent. 2019-10-24 Jakub Jelinek PR c++/88335 - Implement P1073R3: Immediate functions c-family/ * c-common.h (enum rid

[PATCH] Add missing space in various string literals

2019-10-24 Thread Jakub Jelinek
issing space. This change reminded me that it is time to run my https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00844.html script again. While it has lots of false positives, it discovered quite a few issues besides the bug you've fixed. I'll commit this as obvious to trunk if it passes b

[ADA PATCH] Fix locales.c iso_3166 bug

2019-10-24 Thread Jakub Jelinek
han United-States to US, Uruguay to UY, Uzbekistan to UZ etc. Ok for trunk if it passes bootstrap/regtested on x86_64-linux? 2019-10-24 Jakub Jelinek * locales.c (iso_3166): Add missing comma after "United-States". --- gcc/ada/locales.c.jj2019-01-08 11:55:16.7922063

[committed] Further omp declare variant progress

2019-10-24 Thread Jakub Jelinek
a single matching variant. As the C++ omp declare variant patch has not been committed yet, it is for now limited to C. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2019-10-24 Jakub Jelinek * gimplify.h (omp_construct_selector_matches): Declare

[C++ PATCH] Fix up decl_in_std_namespace_p handling of --enable-symvers=gnu-versioned-namespace

2019-10-24 Thread Jakub Jelinek
namespace inside of it (std::_8::{construct_at,forward,move,...}). The following patch changes the function all of those calls use to look through inline namespaces. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2019-10-24 Jakub Jelinek * typeck.c (decl_in_std_n

[PATCH] Unbreak -masm=intel (PR target/92258)

2019-10-28 Thread Jakub Jelinek
) (const_string "1") (const_string "0"))) (set_attr "mode" "")]) While operands[1] has V2DFmode or V4SFmode and thus not a scalar mode, we still want a q or k modifier on it, because that is what the instruction ac

[committed] Fix install.texi typo

2019-10-29 Thread Jakub Jelinek
-10-29 Jakub Jelinek * doc/install.texi (--enable-offload-targets): Fix up a typo in the example, use actual names of supported offload targets. --- gcc/doc/install.texi.jj 2019-10-25 09:31:05.0 +0200 +++ gcc/doc/install.texi2019-10-27 10:04:20.830707973 +0100

[PATCH] Don't mention MMX in -msse etc. option descriptions

2019-10-29 Thread Jakub Jelinek
code generation and I think listing MMX in there does more harm than good, it is something that should better be explained in the documentation. Ok for trunk? 2019-10-29 Jakub Jelinek * config/i386/i386.opt (-msse, -msse2, -msse3, -mssse3, -msse4.1, -msse4.2, -msse4, -mavx, -

[RFC PATCH] targetm.omp.device_kind_arch_isa and OpenMP declare variant kind/arch/isa handling

2019-10-29 Thread Jakub Jelinek
d in To:? Martin listed for HSA, I'm afraid right now not really sure at which point it would be possible to distinguish hsa guarded targeted code from host targeted one. CCed some backend maintainers for thoughts on what would be reasonable values for the target hook on their backends. 2019-

Re: [RFC PATCH] targetm.omp.device_kind_arch_isa and OpenMP declare variant kind/arch/isa handling

2019-10-29 Thread Jakub Jelinek
On Tue, Oct 29, 2019 at 05:40:11PM -0500, Segher Boessenkool wrote: > On Tue, Oct 29, 2019 at 06:15:31PM +0100, Jakub Jelinek wrote: > > The standard makes it implementation defined what an arch is and what is > > isa, but I think because there is no selector like target t

[PATCH] Fix a tree sharing bug in get_*_computation_at (PR tree-optimization/92262)

2019-10-29 Thread Jakub Jelinek
sted on x86_64-linux and i686-linux, ok for trunk? 2019-10-30 Jakub Jelinek PR tree-optimization/92262 * tree-ssa-loop-ivopts.c (get_debug_computation_at): Don't unshare ubase or cbase here. (remove_unused_ivs): Unshare comp before using it. * g++.dg

Re: [PATCH] Don't mention MMX in -msse etc. option descriptions

2019-10-30 Thread Jakub Jelinek
On Wed, Oct 30, 2019 at 08:01:28AM +0100, Uros Bizjak wrote: > > While working on the OpenMP isa patch, I've noticed most of the x86 ISA > > options imply in the help text that it enables MMX, when they do not. > > We now have the mmx in sse2, so to some extent most of the built-in > > functions >

<    1   2   3   4   5   6   7   8   9   10   >