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

2018-07-03 Thread Nathan Sidwell
lookup and generally it is ok that they have user accessible names. Just the range for vars are a special case. Yeah, I'd rather not have DECL_ARTIFICIAL be significant in name lookup. An unspellable name would be better, which is what we do for, eg, ctors. nathan -- Nathan Sidwell

Re: Invert sense of NO_IMPLICIT_EXTERN_C

2018-07-03 Thread Nathan Sidwell
could a global reviewer comment? This touches a lot of target-specific config files. David has kindly checked AIX is ok, the known target needing the functionality. https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01568.html nathan On 06/25/2018 12:48 PM, Nathan Sidwell wrote

[PR c++/86374] Name lookup failure in enclosing template

2018-07-13 Thread Nathan Sidwell
es the code in tsubst_aggr_class itself, when it's tsubsting the context of the class it is dealing with. A small drive-by cleanup in the parser. Committing to trunk now. will commit to gcc-8 after testing there. nathan -- Nathan Sidwell 2018-07-13 Nathan Sidwell PR c++/86374 * pt.c (loo

Re: C++ patch ping

2018-07-13 Thread Nathan Sidwell
How hard would it be to add the 6 special identifiers to the C++ global table via initialize_predefined_identifiers (decl.c) and then use them directly in the for range machinery? repeated get_identifier ("string-const") just smells bad. nathan -- Nathan Sidwell

Re: C++ patch ping

2018-07-13 Thread Nathan Sidwell
On 07/13/2018 09:49 AM, Jakub Jelinek wrote: - PR c++/3698, PR c++/86208 extern_decl_map & TREE_USED fix (plus 2 untested variants) http://gcc.gnu.org/ml/gcc-patches/2018-07/msg00084.html ok, thanks -- Nathan Sidwell

Re: [C++ Patch] Check permerror return value

2018-07-16 Thread Nathan Sidwell
On 07/16/2018 07:46 AM, Paolo Carlini wrote: Hi, over the last weeks, while working on various diagnostic issues, I noticed a few defective permerror + inform pairs. Tested x86_64-linux. ok, thanks -- Nathan Sidwell

Re: [PATCH][C++] Fix PR86523

2018-07-17 Thread Nathan Sidwell
-hook invocation because of that. So the easy fix is to flush out globals before starting the init function. looks sensible, ok. nathan -- Nathan Sidwell

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

2018-07-18 Thread Nathan Sidwell
So cool! Thanks. Sorry for the top posting nathan-- Nathan Sidwell Original message From: Jakub Jelinek Date: 7/18/18 17:04 (GMT-05:00) To: Nathan Sidwell Cc: Jason Merrill , gcc-patches@gcc.gnu.org Subject: [C++ PATCH] Further get_identifier ("string literal&quo

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

2018-07-25 Thread Nathan Sidwell
On 07/18/2018 06:43 PM, Jakub Jelinek wrote: On Wed, Jul 18, 2018 at 06:00:20PM -0400, Nathan Sidwell wrote: So cool! Thanks. Ok for both patches or just this one? both are ok, sorry for delay (vacation), thanks for doing that! nathan -- Nathan Sidwell

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
e_overloaded_builtin already works correctly with template instantiations, but a templatatized testcase would be nice -- shout if you'd like help constructing one. nathan -- Nathan Sidwell

Re: [PATCH 01/11] Add __builtin_speculation_safe_value

2018-07-27 Thread Nathan Sidwell
elp! added to todo list. nathan -- Nathan Sidwell

Re: [PATCH] Fix an UBSAN error in cp/parse.c (PR c++/86653).

2018-07-27 Thread Nathan Sidwell
On 07/26/2018 04:52 AM, Martin Liška wrote: Hello. Quite simple patch that initializes a boolean value before it's used. The variable is not initialized when an error recovery happens. Ready for trunk after testing? ok, thanks nathan -- Nathan Sidwell

Re: [PATCH] c++/modules: ICE with lambda initializing local var [PR105322]

2023-10-20 Thread Nathan Sidwell
6 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/lambda-5_b.C @@ -0,0 +1,10 @@ +// PR c++/105322 +// { dg-additional-options -fmodules-ts } + +import pr105322; + +int main() { + f1(); + f2(); + g3(); +} -- Nathan Sidwell From fb65e961231943ecc68988f38a9ec78b0c93e5df Mon Sep 17 00:00:00 2001 From

Re: [PATCH] c++/modules: fix up recent testcases

2023-10-25 Thread Nathan Sidwell
5_a.C index 6b589d4965c..37d0e77b1e1 100644 --- a/gcc/testsuite/g++.dg/modules/lambda-5_a.C +++ b/gcc/testsuite/g++.dg/modules/lambda-5_a.C @@ -1,5 +1,5 @@ // PR c++/105322 -// { dg-module-do link +// { dg-module-do link } // { dg-additional-options -fmodules-ts } // { dg-module-cmi pr105322.

c++: Stat-hack for members [PR 98530]

2021-01-21 Thread Nathan Sidwell
s/stat-mem-1_a.H: New. * g++.dg/modules/stat-mem-1_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index b4b6c0b81b5..c99f2e3622d 100644 --- c/gcc/cp/name-lookup.c +++ w/gcc/cp/name-lookup.c @@ -3926,11 +3926,16 @@ lookup_class_binding (tree klass,

c++: Fix null this pointer [PR 98624]

2021-01-21 Thread Nathan Sidwell
):Check state before calling write_location. (sort_cluster, module_state::write): Adjust find_dependencies call. -- Nathan Sidwell diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc index 8f9c7940ef8..6741ae03ee7 100644 --- i/gcc/cp/module.cc +++ w/gcc/cp/module.cc @@ -2567,7 +2567,7

Re: driver: do not check input file existence here [PR 98452]

2021-01-21 Thread Nathan Sidwell
On 1/21/21 12:59 PM, Joseph Myers wrote: On Wed, 20 Jan 2021, Nathan Sidwell wrote: Unspecified non-existent response file: OLD: (1)devvm293:282>g++ -c @nothing g++: error: nothing: No such file or directory g++: fatal error: no input files compilation terminated. NEW: (1)devvm293:284&g

Re: driver: do not check input file existence here [PR 98452]

2021-01-22 Thread Nathan Sidwell
On 1/21/21 3:20 PM, Joseph Myers wrote: On Thu, 21 Jan 2021, Nathan Sidwell wrote: Do you want expandargv altered alongs the lines you mention? Or a bug filed? [in order for my patch to be acceptable] The patch is OK as-is. Filing a bug for expandargv handling of missing files might be a

testsuite: Uniquify test names [PR 98795]

2021-01-22 Thread Nathan Sidwell
testsuite/98795 gcc/testsuite/ * g++.dg/modules/modules.exp (module_cmi_p): Avoid embedded absolute paths. (module_do_it): Append $std to test name. -- Nathan Sidwell diff --git c/gcc/testsuite/g++.dg/modules/modules.exp w/gcc/testsuite/g++.dg/modules/modules.exp index

Re: [PATCH] config: check for sighandler_t properly

2021-01-25 Thread Nathan Sidwell
apper-client.h?) Thanks for noticint this. I think this is left over from earlier module-mapper predating its move (and changes) to c++tools. If you'd like to remove that entire bit of configure.ac, that'd be great (or I can do so, if you don't have time) nathan -- Nathan Sidwell

c++: cross-module __cxa_atexit use [PR 98531]

2021-01-25 Thread Nathan Sidwell
p_abi_namespace): Moved to decl.c. gcc/testsuite/ * g++.dg/modules/pr98531.h: New. * g++.dg/modules/pr98531_a.H: New. * g++.dg/modules/pr98531_b.C: New. -- Nathan Sidwell diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 51139f4a4be..fef

Re: [PATCH] config: check for sighandler_t properly

2021-01-25 Thread Nathan Sidwell
On 1/25/21 12:50 PM, Nick Alcock wrote: On 25 Jan 2021, Nathan Sidwell uttered the following: On 1/22/21 12:19 PM, Nick Alcock wrote: Searching for sighander_t is unlikely to succeed anywhere. The attempt to #include is also not working, and fixing it shows that doing an AC_DEFINE in the

c++: header unit template alias merging [PR 98770]

2021-01-28 Thread Nathan Sidwell
PR c++/98770 gcc/cp/ gcc/testsuite/ * g++.dg/modules/pr98770_a.C: New. * g++.dg/modules/pr98770_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 18f5de8724b..daf75b16007 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc

Re: c++: header unit template alias merging [PR 98770]

2021-01-28 Thread Nathan Sidwell
On 1/28/21 7:54 AM, Nathan Sidwell wrote: Typedefs are streamed by streaming the underlying type, and then recreating the typedef.  But this breaks checking a duplicate is the same as the original when it is a template alias -- we end up checking a template alias (eg __void_t) against the

c++: Fix unordered entity array [PR 98843]

2021-01-29 Thread Nathan Sidwell
e_state::write): Set config's num_entities. (module_state::read_initial): Allocate the entity ary span here. (module_state::read_language): Do not set entity_lwm here. gcc/testsuite/ * g++.dg/modules/pr98843_a.C: New. -- Nathan Sidwell diff --git c/

Re: c++: cross-module __cxa_atexit use [PR 98531]

2021-01-29 Thread Nathan Sidwell
all of the issues you encountered in the PR. On 1/25/21 1:01 PM, Nathan Sidwell wrote: [ARM has unique ABI here, hence cc'ing Richard] Solaris tickled this bug as it has some mutex/sync/something primitive with a destructor, hence wanted to generate a __cxa_atexit call inside an inline

Re: c++: cross-module __cxa_atexit use [PR 98531]

2021-02-03 Thread Nathan Sidwell
98531-2_a.H: New. * g++.dg/modules/pr98531-2_b.C: New. * g++.dg/modules/pr98531-3.h: New. * g++.dg/modules/pr98531-3_a.H: New. * g++.dg/modules/pr98531-3_b.C: New. -- Nathan Sidwell diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index f31319904eb..bb06b6e44

driver: error for nonexistent linker inputs [PR 98943]

2021-02-04 Thread Nathan Sidwell
gcc/ * gcc.c (driver::maybe_run_linker): Check for input file accessibility if not linking. gcc/testsuite/ * c-c++-common/pr98943.c: New. booted & tested on x86_64-linux, ok? nathan -- Nathan Sidwell diff --git c/gcc/gcc.c w/gcc/gcc.c index aa5774af7e7..96381a77dee

c++: Fix indirect partitions [PR 98944]

2021-02-09 Thread Nathan Sidwell
* g++.dg/modules/pr98944_d.C: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 41ce2011525..0749db8fe94 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc @@ -3608,8 +3608,8 @@ class GTY((chain_next ("%h.parent"), for_user)) module_state { } p

c++: generic lambdas and local-externs from outer scopes [PR 99030]

2021-02-10 Thread Nathan Sidwell
tly -- it's not dependent. PR c++/99030 gcc/cp * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the answer if there's no local specialization. gcc/testsuite/ * g++.dg/lookup/pr99030.C: New. -- Nathan Sidwell diff --git c/gcc/cp

Expunge namespace-scope IDENTIFIER_TYPE_VALUE & global_type_name [PR 99039]

2021-02-12 Thread Nathan Sidwell
't use IDENTIFIER_HAS_TYPE_VALUE to determine ctorness. gcc/testsuite/ * g++.dg/lookup/pr99039.C: New. -- Nathan Sidwell diff --git c/gcc/cp/call.c w/gcc/cp/call.c index 4744c9768ec..186feef6fe3 100644 --- c/gcc/cp/call.c +++ w/gcc/cp/call.c @@ -236,8 +236,15 @@ c

c++: Register streamed-in decls when new [PR 99040]

2021-02-12 Thread Nathan Sidwell
checking and incomplete var checking. gcc/testsuite/ * g++.dg/modules/pr99040_a.C: New. * g++.dg/modules/pr99040_b.C: New. * g++.dg/modules/pr99040_c.C: New. * g++.dg/modules/pr99040_d.C: New. -- Nathan Sidwell diff --git c/gcc/cp/mod

c++: Seed imported bindings [PR 99039]

2021-02-12 Thread Nathan Sidwell
gcc/cp/ * module.cc (module_state::write_cluster): Check bindings for imported using-decls. gcc/testsuite/ * g++.dg/modules/pr99039_a.C: New. * g++.dg/modules/pr99039_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/modul

c++: directives-only preprocessing and include translation [PR 99050]

2021-02-16 Thread Nathan Sidwell
. gcc/testsuite/ * g++.dg/modules/pr99050_a.H: New. * g++.dg/modules/pr99050_b.C: New. -- Nathan Sidwell diff --git c/gcc/testsuite/g++.dg/modules/pr99050_a.H w/gcc/testsuite/g++.dg/modules/pr99050_a.H new file mode 100644 index 000..137e37f567f --- /dev/null +++ w/gcc

c++: ICE with header-units [PR 99071]

2021-02-17 Thread Nathan Sidwell
/modules/pr99071_a.H: New. * g++.dg/modules/pr99071_b.H: New. -- Nathan Sidwell diff --git c/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index 5aa206d40d4..fda987e9616 100644 --- c/gcc/cp/name-lookup.c +++ w/gcc/cp/name-lookup.c @@ -3525,7 +3525,7 @@ maybe_record_mergeable_decl (tree *slot, tree

c++: More set_identifier_type_value fixing [PR 99116]

2021-02-17 Thread Nathan Sidwell
h_scope at non-class template parm scope, and use parent scope. gcc/testsuite/ * g++.dg/lookup/pr99116-1.C: New. * g++.dg/lookup/pr99116-2.C: New. -- Nathan Sidwell diff --git c/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index 5aa206d40d4..0b0fb80c1ff 100644 --- c/g

Re: [PATCH] c++: Fix up build_zero_init_1 once more [PR99106]

2021-02-17 Thread Nathan Sidwell
+.dg/ubsan/pr99106.C2021-02-16 09:35:42.904767167 +0100 @@ -0,0 +1,5 @@ +// PR sanitizer/99106 +// { dg-do compile } +// { dg-options "-fsanitize=undefined" } + +#include "../ext/flexary38.C" Jakub -- Nathan Sidwell

Re: [PATCH] c++: Fix -std=c++20 ICE on virtual method call [PR99132]

2021-02-18 Thread Nathan Sidwell
T c; }; +template struct B { + A d; + constexpr T operator-> () { return d.c; } + B (B &&); +}; +struct C { + virtual void foo (); + void bar (B h) { h->foo (); } +}; Jakub -- Nathan Sidwell

Re: [r11-7271 Regression] FAIL: g++.dg/modules/pr99023_a.H (test for excess errors) on Linux/x86_64

2021-02-18 Thread Nathan Sidwell
: definition of 'class std::initializer_list<_E>' does not match '#include ' compilation terminated. sigh, I shouldn't have picked a header that is somewhat ABI-specific nathan -- Nathan Sidwell

c++: Remove large abi-specific tests [PR 99150]

2021-02-18 Thread Nathan Sidwell
:( -- Nathan Sidwell

c++: Remove obsolete dg-module-headers [PR 99023]

2021-02-18 Thread Nathan Sidwell
necessary. PR c++/99023 gcc/testsuite/ * modules.exp: Remove dg-module-headers support * alias-2_a.H: Delete. * sys/alias-2_a.H: Delete. -- Nathan Sidwell diff --git c/gcc/testsuite/g++.dg/modules/alias-2_a.H w/gcc/testsuite/g++.dg/modules/alias-2_a.H de

c++: header-unit build capability [PR 99023]

2021-02-18 Thread Nathan Sidwell
stsuite/ * g++.dg/modules/modules.exp: Bail on cross-testing. Add support for .X files. * g++.dg/modules/pr99023_a.X: New. * g++.dg/modules/pr99023_b.X: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 064e57a29c4..e801c52069e 100644 --

c++: Inform of CMI reads [PR 99166]

2021-02-19 Thread Nathan Sidwell
: New. -- Nathan Sidwell diff --git c/gcc/c-family/c.opt w/gcc/c-family/c.opt index b209d46d32b..3264c646ad3 100644 --- c/gcc/c-family/c.opt +++ w/gcc/c-family/c.opt @@ -1752,6 +1752,14 @@ flang-info-include-translate= C++ Joined RejectNegative MissingArgError(missing header name) Note a #include transl

c++: Incorrect module-number ordering [PR 98741]

2021-02-19 Thread Nathan Sidwell
increasing. gcc/testsuite/ * g++.dg/modules/pr98741_a.H: New. * g++.dg/modules/pr98741_b.H: New. * g++.dg/modules/pr98741_c.C: New. * g++.dg/modules/pr98741_d.C: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 691381bf995..3d17b8dd

c++: cross-header-unit template definitions [PR 99153]

2021-02-22 Thread Nathan Sidwell
to common-path. * module.cc (set_defining_module): Add assert. gcc/testsuite/ * g++.dg/modules/pr99153_a.H: New. * g++.dg/modules/pr99153_b.H: New. -- Nathan Sidwell diff --git c/gcc/cp/decl.c w/gcc/cp/decl.c index 6f3414f058e..7fa8f52d667 100644 --- c/gcc/cp/decl.c

c++: Recursing header imports and other duplicates [PR 99174]

2021-02-22 Thread Nathan Sidwell
odules/pr99174-1_b.C: New. * g++.dg/modules/pr99174-1_c.C: New. * g++.dg/modules/pr99174.H: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 3d17b8ddcdb..09a9ca8778b 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc @@ -3551,9 +3551,10 @@ class GTY((chain_nex

c++: typedef for linkage [PR 99208]

2021-02-23 Thread Nathan Sidwell
Check DECL identity, not IDENTIFIER identity. gcc/testsuite/ * g++.dg/modules/pr99208_a.C: New. * g++.dg/modules/pr99208_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/decl.c w/gcc/cp/decl.c index 7fa8f52d667..1742e286d9f 100644 --- c/gcc/cp/decl.c +++ w/gcc/cp/decl.c @@

c++: modules & -fpreprocessed [PR 99072]

2021-02-24 Thread Nathan Sidwell
* init.c (read_original_filename): Expunge all evidence of the original filename. gcc/testsuite/ * g++.dg/modules/pr99072.H: New. -- Nathan Sidwell diff --git c/gcc/testsuite/g++.dg/modules/pr99072.H w/gcc/testsuite/g++.dg/modules/pr99072.H new file mode 100644 in

c++: Macro location fixes [PR 98718]

2021-02-24 Thread Nathan Sidwell
. (preprocessed_module): Likewise. libcpp/ * include/line-map.h * line-map.c gcc/testsuite/ * g++.dg/modules/pr98718_a.C: New. * g++.dg/modules/pr98718_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 766f2ab853d..e576face0d8

c++: Fix typo in module-mapper [PR 98318]

2021-02-25 Thread Nathan Sidwell
User reported this typo: '0' and '-' are right next to each other, and as it happened I always had networking, so it went unnoticed. PR c++/98318 gcc/cp/ * mapper-client.cc (module_client::open_module_client): Fix typo of fd init. -- Natha

Re: [PATCH] coroutines : Call promise CTOR with parm copies [PR97587].

2021-02-25 Thread Nathan Sidwell
: PR c++/97587 * g++.dg/coroutines/coro1-refs-and-ctors.h: Add a CTOR with two reference parms, to distinguish the rvalue ref. variant. * g++.dg/coroutines/pr97587.C: New test. ok, thanks -- Nathan Sidwell

c++tools: Make NETWORKING define check consistent [PR 98318]

2021-02-25 Thread Nathan Sidwell
PR98318 also pointed out that the NETWORKING #define was being checked with both #if and #ifdef. Let's consistently use one form. c++tools/ * server.cc: Use #if NETWORKING not #ifdef, to be consistent with elsewhere. -- Nathan Sidwell diff --git c/c++tools/serv

c++: Rename new -flang-note-module-read option [PR 99166]

2021-02-25 Thread Nathan Sidwell
6_d.C: Adjust. -- Nathan Sidwell diff --git c/gcc/c-family/c.opt w/gcc/c-family/c.opt index 3264c646ad3..64e46e7573e 100644 --- c/gcc/c-family/c.opt +++ w/gcc/c-family/c.opt @@ -1752,11 +1752,11 @@ flang-info-include-translate= C++ Joined RejectNegative MissingArgError(missing header name) Note a #in

c++: Completeness of typedef structs [PR 99294]

2021-03-01 Thread Nathan Sidwell
erialize alignment here. gcc/testsuite/ * g++.dg/modules/pr99294.h: New. * g++.dg/modules/pr99294_a.C: New. * g++.dg/modules/pr99294_b.C: New. -- Nathan Sidwell diff --git c/gcc/cp/class.c w/gcc/cp/class.c index 40f5fef7baa..ea007e88e6e 100644 --- c/gcc/cp/cla

c++: namespace reachability [PR 99344]

2021-03-03 Thread Nathan Sidwell
e): Alter param ordering. gcc/testsuite/ * g++.dg/modules/namespace-2_a.C * g++.dg/modules/pr99344_a.C * g++.dg/modules/pr99344_b.C -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 369a02604fe..31172824fdd 100644 --- c/gcc/cp/module.cc +++ w/g

c++: Defer specialization registration [PR 99170]

2021-03-03 Thread Nathan Sidwell
leting the decl. (trees_out::key_mergeable): Drop some streaming here ... (trees_in::key_mergeable): ... and here. Don't insert into specialization tables. -- Nathan Sidwell diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc index 31172824fdd..b068acea3bd 100644 --

c++: Defer cloning to post-loading [PR 99170]

2021-03-03 Thread Nathan Sidwell
ad_binding, lazy_load_specializations): Likewise (lazy_load_members): Likewise -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index b068acea3bd..b7b9c3734f2 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc @@ -2644,6 +2644,10 @@ depset *depset::make_entity (tree entity, enti

c++: Redesign pending entity handling [PR 99170]

2021-03-04 Thread Nathan Sidwell
es/tpl-spec-3_a.C: Adjust scan. * g++.dg/modules/tpl-spec-3_b.C: Adjust scan. * g++.dg/modules/tpl-spec-4_a.C: Adjust scan. * g++.dg/modules/tpl-spec-4_b.C: Adjust scan. * g++.dg/modules/tpl-spec-5_a.C: Adjust scan. * g++.dg/modules/tpl-spec-5_b.C: Adjust scan

Re: [PATCH] c-ppoutput: Fix preprocessing ICE on very large line number [PR99325]

2021-03-04 Thread Nathan Sidwell
I think I noticed that signed/unsigned confusion when futzing around with modules, but didn't feel like diving in :) nathan -- Nathan Sidwell

c++: Post-pending redesign cleanup [PR 99170]

2021-03-04 Thread Nathan Sidwell
... (direct_import): ... and here. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 3ee71e5211f..31bbf9776dd 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc @@ -2697,167 +2697,11 @@ pending_map_t *pending_table; completed. */ vec *post_load_decls

Re: [PATCH] coroutines : Adjust constraints on when to build ctors [PR98118].

2021-03-04 Thread Nathan Sidwell
/ 10.x? thanks Iain gcc/cp/ChangeLog: PR c++/98118 * coroutines.cc (build_co_await): Use type_build_ctor_call() to determine cases when a CTOR needs to be built. (flatten_await_stmt): Likewise. (morph_fn_to_coro): Likewise. ok, thanks -- Nathan

Re: [PATCH] coroutines : Do not accept throwing final await expressions [PR95616].

2021-03-04 Thread Nathan Sidwell
this DTRT in the presence of -fno-exceptions? (i.e. use of that flag means you don't have to decorate everything with noexcept) nathan -- Nathan Sidwell

Re: [PATCH] coroutines : Handle exceptions throw before the first await_resume() [PR95615].

2021-03-04 Thread Nathan Sidwell
ace after comma). nathan -- Nathan Sidwell

c++: instantiating imported specializations [PR 99389]

2021-03-05 Thread Nathan Sidwell
pt.c (instantiate_class_template_1): Set instantiating module here. gcc/testsuite/ * g++.dg/modules/pr99389_a.H: New. * g++.dg/modules/pr99389_b.C: New. * g++.dg/modules/pr99389_c.C: New. -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index 835891

c++: Local instantiations of imported specializations [PR 99377]

2021-03-05 Thread Nathan Sidwell
set_instantiating_module. gcc/testsuite/ * g++.dg/modules/pr99377_a.H: New. * g++.dg/modules/pr99377_b.C: New. * g++.dg/modules/pr99377_c.C: New. -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index 8ca3dc8ec2b..1f3cd9c45f1 100644 --- c/gcc/cp/pt.c +++ w/gcc/cp

c++: Duplicate namespace bindings [PR 99245]

2021-03-05 Thread Nathan Sidwell
::write_cluster): Relax binding assert. gcc/testsuite/ * g++.dg/modules/pr99245_a.H: New. * g++.dg/modules/pr99245_b.H: New. -- Nathan Sidwell diff --git c/gcc/cp/module.cc w/gcc/cp/module.cc index 31bbf9776dd..48862dd9bbc 100644 --- c/gcc/cp/module.cc +++ w/gcc/cp/module.cc

c++: Incorrect specialization hash table [PR 99285]

2021-03-08 Thread Nathan Sidwell
. (specialization_add): Likewise. * pt.c (match_mergeable_specialization): Do not insert. (add_mergeable_specialization): Add to hash table here. gcc/testsuite/ * g++.dg/modules/pr99285_a.H: New. * g++.dg/modules/pr99285_b.H: New. -- Nathan Sidwell diff --git c/gcc/cp/cp

c++: Poor diagnostic in header-unit [PR 99468]

2021-03-08 Thread Nathan Sidwell
ct in header-unit. gcc/testsuite/ * g++.dg/modules/pr99468.H: New. -- Nathan Sidwell diff --git c/gcc/cp/lex.c w/gcc/cp/lex.c index c83346b617d..73e14b8394c 100644 --- c/gcc/cp/lex.c +++ w/gcc/cp/lex.c @@ -515,7 +515,7 @@ struct module_token_filter { module_end:; /* End o

C++: Enable c++2b module mode [PR 99436]

2021-03-08 Thread Nathan Sidwell
This adds support for c++23 mode to modules, and enables such testing. PR c++/99436 gcc/cp/ * name-lookup.c (get_cxx_dialect_name): Add cxx23. gcc/testsuite/ * g++.dg/modules/modules.exp (MOD_STD_LIST): Add 2b. -- Nathan Sidwell diff --git c/gcc/cp/name

i386: Fix array index in expander

2020-09-11 Thread Nathan Sidwell
I noticed a compiler warning about out-of-bound access. Fixed thusly. gcc/ * config/i386/sse.md (mov): Fix operand indices. pushed as obvious -- Nathan Sidwell diff --git i/gcc/config/i386/sse.md w/gcc/config/i386/sse.md index a728b979f01..a784346a23b 100644 --- i/gcc/config

Re: i386: Fix array index in expander

2020-09-14 Thread Nathan Sidwell
On 9/14/20 6:10 AM, Hongtao Liu wrote: On Mon, Sep 14, 2020 at 3:51 PM Richard Biener via Gcc-patches wrote: On Fri, Sep 11, 2020 at 11:19 PM Nathan Sidwell wrote: I noticed a compiler warning about out-of-bound access. Fixed thusly. gcc/ * config/i386/sse.md (mov

c++: local externs in templates do not get template head

2020-09-14 Thread Nathan Sidwell
.) gcc/cp/ * pt.c (push_template_decl_real): Don't attach a template head to local externs. (tsubst_function_decl): Add support for headless local extern decls. (tsubst_decl): Add support for headless local extern decls. pushed to trunk -- Nathan Si

Re: c++: local externs in templates do not get template head

2020-09-14 Thread Nathan Sidwell
On 9/14/20 12:49 PM, Marek Polacek wrote: On Mon, Sep 14, 2020 at 12:45:33PM -0400, Nathan Sidwell wrote: Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can teach the template machinery not to give them a TEMPLATE_DECL head, and the instantiation machinery treat them as the

Re: c++: local externs in templates do not get template head

2020-09-15 Thread Nathan Sidwell
anges. gcc/cp/ * pt.c (push_template_decl_real): OMP reductions retain a template header. (tsubst_function_decl): Likewise. pushed to trunk nathan -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index c630ef5a070..1aea105edd5 100644 --- c/gcc/cp/pt.c +++ w/gcc/cp

openmp question

2020-09-16 Thread Nathan Sidwell
ors are what I observe with my WIP dealing with my recent breakage of that test. (adding the missing ctor makes the test pass) Also, it seems cp_check_omp_declare_reduction (d) doesn;t set the reduction to a suitably formed error_mark_node on failure-- so downstream consumers can see the rej

c++: Break out actual instantiation from instantiate_decl

2020-09-16 Thread Nathan Sidwell
n out of .. (instantiate_decl): ... here. Call it. pushing to trunk -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index 1aea105edd5..e8aa950b8fa 100644 --- c/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@ -25447,6 +25447,158 @@ register_parameter_specializations (tree pattern, tree

c++: Avoid confusing 'nested' name

2020-09-16 Thread Nathan Sidwell
(instantiate_body): Remove 'nested' var, simplify push_to_top logic. pushing to trunk -- Nathan Sidwell diff --git i/gcc/cp/pt.c w/gcc/cp/pt.c index e8aa950b8fa..289452ab740 100644 --- i/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@ -25458,17 +25458,15 @@ instantiate_body (tree pattern

c++: local-scope OMP UDR reductions have no template head

2020-09-16 Thread Nathan Sidwell
l): Reject FUNCTION_SCOPE entities, adjust instantiate_body call. gcc/testsuite/ * g++.dg/gomp/udr-2.C: Add additional expected error. libgomp/ * testsuite/libgomp.c++/udr-3.C: Add missing ctor. -- Nathan Sidwell diff --git i/gcc/c-family/c-opts.c w/gcc/c-family/c-op

Re: c++: local-scope OMP UDR reductions have no template head

2020-09-16 Thread Nathan Sidwell
On 9/16/20 2:31 PM, Jakub Jelinek wrote: On Wed, Sep 16, 2020 at 02:11:32PM -0400, Nathan Sidwell wrote: Jakub, are you ok with the bool return from cp_check_omp_declare_reduction? That seemed like the least invasive change. This corrects the earlier problems with removing the template header

C++RFC: Extending __builtin_FUNCTION

2020-09-17 Thread Nathan Sidwell
(or defaulted?) constant arg. Something like: __builtin_FUNCTION () -> current behavior __builtin_FUNCTION (0) -> as current __builtin_FUNCTION (1) -> as qualified name __builtin_FUNCTION (2) -> as __PRETTY_FUNCTION__ thoughts? nathan -- Nathan Sidwell

c++: ts_lambda is not needed

2020-09-21 Thread Nathan Sidwell
Killed thusly. gcc/cp/ * decl.c (xref_tag_1): Use IDENTIFIER_LAMBDA_P to detect lambdas. * lambda.c (begin_lambda_type): Use ts_current to push the tag. * name-lookup.h (enum tag_scope): Drop ts_lambda. pushed to trunk. nathan [*] I can only blame myself :) -- Nathan Sid

c++: fix injected friend of template class

2020-09-22 Thread Nathan Sidwell
ug by deleting code! gcc/cp/ * pt.c (instantiate_class_template_1): Do not repush and unhide injected friend. gcc/testsuite/ * g++.old-deja/g++.pt/friend34.C: Check injected friend is still invisible. pushed to trunk nathan -- Nathan Sidwell diff --git

c++: Remove a broken error-recovery path

2020-09-22 Thread Nathan Sidwell
pt.c (lookup_template_class_1): Erroneously located class definitions just give error_mark, don't try and inject it into the namespace. pushed to trunk -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 71353814973..029a165a3e8 100644 --- i/gcc/cp/cp-tree.h

c++: dependent local extern decl ICE [PR97171]

2020-09-23 Thread Nathan Sidwell
_DECL]: Retrieve local specialization for DECL_LOCAL_P decls. gcc/testsuite/ * g++.dg/template/local10.C: New. pushing to trunk nathan -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index 314bd038c6d..1ec039d0793 100644 --- c/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@ -16

c++: Remove some gratuitous typedefing

2020-09-23 Thread Nathan Sidwell
This is C++, we don't need 'typedef struct foo foo;'. Oh, and bool bitfields are a thing. gcc/cp/ * name-lookup.h (typedef cxx_binding): Delete tdef. (typedef cp_binding_level): Likewise. (struct cxx_binding): Flags are bools. pushing to trunk n

c++: local-decls are never member fns [PR97186]

2020-09-24 Thread Nathan Sidwell
g/template/local10.C: Rename ... * g++.dg/template/local-fn3.C: .. here. Require lto. * g++.dg/template/local-fn4.C: New. pushing to trunk nathan -- Nathan Sidwell diff --git c/gcc/cp/pt.c w/gcc/cp/pt.c index 1ec039d0793..62e85095bc4 100644 --- c/gcc/cp/pt.c +++ w/gcc/cp/pt.c @@

c++: Cleanup some decl pushing apis

2020-09-24 Thread Nathan Sidwell
ushdecl call. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/coroutines.cc w/gcc/cp/coroutines.cc index 898b88b7075..ba813454a0b 100644 --- i/gcc/cp/coroutines.cc +++ w/gcc/cp/coroutines.cc @@ -4011,7 +4011,7 @@ morph_fn_to_coro (tree orig, tree *resumer, tree *destroyer) /* 2. Types we

c++: DECL_BUILTIN_P for builtins

2020-09-25 Thread Nathan Sidwell
t we never find a valid duplicate. * pt.c (tsubst_expr): Function-scope OMP UDRs have function context. libcc1/ * libcp1plugin.cc (supplement_binding): Use DECL_BULTIN_P. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 3ae48749

c++: Replace tag_scope with TAG_how

2020-09-25 Thread Nathan Sidwell
. (objcp_xref_tag): Likewise. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index bd78f00ba97..321bb959120 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -6507,7 +6507,7 @@ extern void grok_special_member_properties (tree); extern

c++: Adjust pushdecl/duplicate_decls API

2020-09-25 Thread Nathan Sidwell
el): Replace 'is_friend' with 'hiding'. (pushdecl_top_level): Drop is_friend parm. * pt.c (register_specialization): Comment duplicate_decls call args. (push_template_decl): Commont pushdecl_namespace_level. (tsubst_friend_function, tsubst_friend_class)

c++: Identifier type value should not update binding

2020-09-29 Thread Nathan Sidwell
lue_with_scope calls. (set_identifier_type_value_with_scope): Do not update binding in the namespace-case. Assert it is already there. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index 184e9c873e7..f195e81280a 100644 --- i/gcc/cp/name-l

c++: Name lookup simplifications

2020-09-29 Thread Nathan Sidwell
clear LOCAL_BINDING_P here. * pt.c (push_template_decl): Set friend & anticipated before pushing. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index f195e81280a..89f1a4c5d64 100644 --- i/gcc/cp/name-lookup.c +++ w/gcc/cp/name

c++: Hiddenness is a property of the symbol table

2020-09-29 Thread Nathan Sidwell
date new hidden markers. (lookup_name_1): Check HIDDEN_TYPE_BINDING_P and simplify friend ignoring. (lookup_elaborated_type_1): Use new hidden markers. Reveal the decl here. pushed to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h in

c++: Kill DECL_HIDDEN_FRIEND_P

2020-09-30 Thread Nathan Sidwell
L_HIDDEN_P. * pt.c (check_explicit_specialization): Record found_hidden explicitly. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/call.c w/gcc/cp/call.c index 5606389f4bd..da013e17e14 100644 --- i/gcc/cp/call.c +++ w/gcc/cp/call.c @@ -2220,11 +2220,6 @@ add_function

c++: Refactor lookup_and_check_tag

2020-10-01 Thread Nathan Sidwell
cl first and be done? Well, it is done thusly. gcc/cp/ * decl.c (lookup_and_check_tag): Refactor. pushed to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/decl.c w/gcc/cp/decl.c index 14742c115ad..d2a8d4012ab 100644 --- i/gcc/cp/decl.c +++ w/gcc/cp/decl.c @@ -14885,71 +14885,73 @

c++: pushdecl_top_level must set context

2020-10-01 Thread Nathan Sidwell
nk nathan -- Nathan Sidwell diff --git i/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index 8cd6fe38271..620f3a6 100644 --- i/gcc/cp/name-lookup.c +++ w/gcc/cp/name-lookup.c @@ -7404,6 +7404,8 @@ pushdecl_top_level (tree x) { bool subtime = timevar_cond_start (TV_NAME_LOOKUP); do_push_to

c++: Kill DECL_HIDDEN_P

2020-10-01 Thread Nathan Sidwell
. (ovl_skip_hidden): Likewise. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 48a4074b370..3ccd54ce24b 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -4045,22 +4045,11 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator

c++: Simplify __FUNCTION__ creation

2020-10-02 Thread Nathan Sidwell
fname): ... here & refactor. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/cp-tree.h w/gcc/cp/cp-tree.h index 3ccd54ce24b..aa93b11b91f 100644 --- i/gcc/cp/cp-tree.h +++ w/gcc/cp/cp-tree.h @@ -6520,7 +6520,6 @@ extern tree create_implicit_typedef (tree, tree); extern int local_v

c++: cleanup ctor_omit_inherited_parms [PR97268]

2020-10-02 Thread Nathan Sidwell
.c (base_ctor_omit_inherited_parms): New, broken out of ... (ctor_omit_inherited_parms): ... here, call it with DECL_CLONED_FUNCTION. gcc/testsuite/ * g++.dg/inherit/pr97268.C: New. pushing to trunk nathan -- Nathan Sidwell diff --git c/gcc/cp/cl

c++: Hash table iteration for namespace-member spelling suggestions

2020-10-02 Thread Nathan Sidwell
n/spellcheck-reserved.c: Adjust diagnostic. * g++.dg/spellcheck-typenames.C: Adjust diagnostic. pushing to trunk nathan -- Nathan Sidwell diff --git i/gcc/cp/name-lookup.c w/gcc/cp/name-lookup.c index 620f3a6..4024ceaa74b 100644 --- i/gcc/cp/name-lookup.c +++ w/gcc/cp/name-lookup.c @

  1   2   3   4   5   6   7   8   9   10   >