Re: [PATCH] c++: Implement DR2303 [PR97453]

2020-11-02 Thread kamlesh kumar via Gcc-patches
>>Do you see a reason this wouldn't work? No, I do not see any.This is good. >>so it's probably simplest to go ahead with mine. Yes, thank you. On Mon, Nov 2, 2020 at 9:48 PM Jason Merrill wrote: > > On 11/2/20 10:10 AM, kamlesh kumar wrote: > > addressed jason

Re: [PATCH] c++: Implement DR2303 [PR97453]

2020-11-02 Thread kamlesh kumar via Gcc-patches
addressed jason comments. no regression due to this, tested on x86_64 linux. On Tue, Oct 27, 2020 at 11:09 PM Jason Merrill wrote: > > On 10/22/20 1:31 PM, kamlesh kumar wrote: > > Attaching the patch file. > > > > >>Instead of building a hash table, would

[PATCH] c++: Implement DR2303 [PR97453]

2020-10-22 Thread kamlesh kumar via Gcc-patches
; > On 10/21/20 6:32 AM, kamlesh kumar wrote: > > gcc/cp/ChangeLog > > ------- > > > > 2020-10-21 Kamlesh Kumar > > > > PR c++/97453 > > * pt.c (get_template_base): Implement DR2303, > > Consider closest base while

PATCH [DR2303][PR97453]

2020-10-21 Thread kamlesh kumar via Gcc-patches
gcc/cp/ChangeLog --- 2020-10-21 Kamlesh Kumar PR c++/97453 * pt.c (get_template_base): Implement DR2303, Consider closest base while template deduction when base of base also matches. gcc/testsuite/ChangeLog -- 2020-10

Re: [PATCH] Defined libcall_arg_t

2020-06-16 Thread Kamlesh Kumar via Gcc-patches
be used with the wi:: routines.  If we ever put modes into rtx     integer constants, this should go away and then just pass an rtx in.  */ On 16/06/20 2:34 pm, Richard Sandiford wrote: Thanks for doing this. Kamlesh Kumar via Gcc-patches writes: diff --git a/gcc/rtl.h b/gcc/rtl.h index

Re: [PATCH v1 1/2][PPC64] [PR88877]

2020-06-13 Thread kamlesh kumar via Gcc-patches
second patch in which arg type libcall_arg_t will be propogated on all instances needed. Then final patch which will fix the actual problem reported in PR88877. ChangeLog Entry: 2020-06-13 Kamlesh Kumar * rtl.h (libcall_arg_t): Defined. --- diff --git a/gcc/rtl.h b/gcc/rtl.h index

[PATCH] Defined libcall_arg_t

2020-06-13 Thread Kamlesh Kumar via Gcc-patches
libcall_arg_t will be propogated on all instances needed. Then final patch which will fix the actual problem reported in PR88877. ChangeLog Entry: 2020-06-13 Kamlesh Kumar * rtl.h (libcall_arg_t): Defined. --- diff --git a/gcc/rtl.h b/gcc/rtl.h index 0872cc4..c023ff0 100644 --- a/gcc

[PATCH] Defined libcall_arg_t

2020-06-13 Thread Kamlesh Kumar via Gcc-patches
libcall_arg_t will be propogated on all instances needed. Then final patch which will fix the actual problem reported in PR88877. ChangeLog Entry: 2020-06-13 Kamlesh Kumar * rtl.h (libcall_arg_t): Defined. --- diff --git a/gcc/rtl.h b/gcc/rtl.h index 0872cc4..c023ff0 100644 --- a/gcc

Re: [PATCH v1 1/2][PPC64] [PR88877]

2020-05-25 Thread kamlesh kumar via Gcc-patches
> OTOH, you don't need to name Tuple at all... It should not *have* a > constructor, since you declared it as class... But you can just use > std::tuple here? I thought of using std::tuple but it requires c++11 support. I am not sure we always build gcc with c++11? > > > (emit_library_

[PATCH v1 1/2][PPC64] [PR88877]

2020-05-24 Thread Kamlesh Kumar via Gcc-patches
e and added one more bool member which store unsigned_p which by default is false. This patch does not change underlying behavior yet. This will be done in follow up patches. ChangeLog Entry: 2020-05-24 Kamlesh Kumar * rtl.h (Tuple): Defined and typedefed to rtx_mode_t. (emit_lib

Re: [PATCH][PPC64] [PR88877]

2020-05-22 Thread kamlesh kumar via Gcc-patches
ping? On Tue, May 19, 2020 at 5:32 PM kamlesh kumar wrote: > can someone look at the patch, please? > > > On Wed, Apr 8, 2020 at 9:29 PM Jeff Law wrote: > >> On Mon, 2020-04-06 at 14:58 +0530, kamlesh kumar via Gcc-patches wrote: >> > Hi Richard, >> > He

Re: [PATCH][PPC64] [PR88877]

2020-05-19 Thread kamlesh kumar via Gcc-patches
can someone look at the patch, please? On Wed, Apr 8, 2020 at 9:29 PM Jeff Law wrote: > On Mon, 2020-04-06 at 14:58 +0530, kamlesh kumar via Gcc-patches wrote: > > Hi Richard, > > Here is a discussion we did some time ago > > https://gcc.gnu.org/pipermail/gcc/201

Re: [PATCH][libstd++][PR92156]

2020-04-21 Thread kamlesh kumar via Gcc-patches
the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include +#include +#include +#include +#include + + +int mai

Re: [PATCH][libstd++][PR92156]

2020-04-21 Thread kamlesh kumar via Gcc-patches
lic License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include +#include +#include + +int main() { +auto a = std::any(std::in_place_type, 5); +auto b = std::any(std::in_place_type, {1}); +std::any p = std::pair

Re: [PATCH][libstd++][PR92156]

2020-04-20 Thread kamlesh kumar via Gcc-patches
/any/any. ./kamlesh On Mon, Apr 20, 2020 at 11:54 PM Ville Voutilainen wrote: > > On Mon, 20 Apr 2020 at 21:09, Ville Voutilainen > wrote: > > > > On Sat, 18 Apr 2020 at 03:35, kamlesh kumar via Libstdc++ > > wrote: > > > > > > On Fri, Apr

Re: [PATCH][libstd++][PR92156]

2020-04-17 Thread kamlesh kumar via Gcc-patches
On Fri, Apr 17, 2020, 10:59 PM kamlesh kumar wrote: > Fixes all this. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92156 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91630 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415 > > On Fri, Apr 17, 2020 at 10:45 PM kaml

Re: [PATCH][libstd++][PR92156]

2020-04-17 Thread kamlesh kumar via Gcc-patches
Fixes all this. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92156 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91630 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415 On Fri, Apr 17, 2020 at 10:45 PM kamlesh kumar wrote: > > This patch corrects the requirement of 4,5 and 6th constructo

[PATCH][libstd++][PR92156]

2020-04-17 Thread kamlesh kumar via Gcc-patches
This patch corrects the requirement of 4,5 and 6th constructor As per https://en.cppreference.com/w/cpp/utility/any/any. ChangeLog: 2020-04-17 Kamlesh Kumar PR libstdc++/92156 * include/std/any (ans::any(_ValueType &&):: Remove is_constructible. (

Re: [PATCH][PPC64] [PR88877]

2020-04-06 Thread kamlesh kumar via Gcc-patches
; Yeah, all the callers of emit_library_call* would need to be changed to pass triplets rtx, machine_mode, int/bool /*unsignedp*/, instead of just rtx_mode_t pair. Jakub "" On Mon, Apr 6, 2020 at 2:47 PM Richard Biener wrote: > > On Mon, 6 Apr 2020, kamlesh kumar wrote: > &

Re: [PATCH][PPC64] [PR88877]

2020-04-05 Thread kamlesh kumar via Gcc-patches
Segher, Please provide your suggestion/thought on the fix. On Mon, Mar 23, 2020 at 8:16 PM kamlesh kumar wrote: > > Attached patch fixes. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877. > ChangeLog Entry. > > 2020-03-23 Kamlesh Kumar > > * rtl.h : Define

Re: [PATCH][PPC64] [PR88877]

2020-03-24 Thread kamlesh kumar via Gcc-patches
Thanks Hans-Peter for reviewing. Here is Formatted ChangeLog Entry. 2020-03-24 Kamlesh Kumar * rtl.h: Defined Tuple for bundling rtx, mode and unsignedness (default as 0), Added Extra argument (unsignedp) in emit_library_call and emit_library_call_value. * except.c: Likewise. * explow.c

[PATCH][PPC64] [PR88877]

2020-03-23 Thread kamlesh kumar via Gcc-patches
Attached patch fixes. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877. ChangeLog Entry. 2020-03-23 Kamlesh Kumar * rtl.h : Defined Tuple for bundling rtx, mode and unsignedness default as 0 Added Extra argument (unsignedp) in emit_library_call and emit_library_call_value

Re: RFA: Fix libiberty testsuite failure

2020-01-20 Thread kamlesh kumar
f<((void*)0)==((decltype(nullptr))), > void>::type*) > > > > To me it looks like the expected demangling is incorrect - it wants a > > double set of parentheses around decltype(nullptr) when I think that > > only one is needed. So I would like to apply the patc

[PATCH v3] Updated the Fix:

2019-11-03 Thread Kamlesh Kumar
ChangeLog Entries: gcc/cp -- 2019-11-02 Kamlesh Kumar PR c++/91979 - mangling nullptr expression * cp/mangle.c (write_template_arg_literal): Handle nullptr mangling. gcc -- 2019-11-02 Kamlesh Kumar * common.opt (-fabi-version): Added Description

[PATCH v2] [PR91979] Updated the fix:

2019-11-01 Thread Kamlesh Kumar
Changlogs gcc -- 2019-11-02 Kamlesh Kumar PR c++/91979 - mangling nullptr expression * mangle.c (write_template_arg_literal): Handle nullptr mangling. * testsuite/g++.dg/cpp0x/nullptr27.C: Modify Test. * testsuite/g++.dg/cpp0x/pr91979.C: New Test

Re: [[PATCH][PR91979] handle mangling of nullptr expression ] updated the fix

2019-10-31 Thread kamlesh kumar
Jason, Can you please review this, let me know how can we handle -fabi-version? On Wed, Oct 23, 2019 at 7:55 AM Kamlesh Kumar wrote: > > --- > gcc/cp/mangle.c| 3 ++- > gcc/testsuite/g++.dg/cpp0x/nullptr27.C | 2 +- > gcc/testsuite/g++.dg/cpp0x/p

[[PATCH][PR91979] handle mangling of nullptr expression ] updated the fix

2019-10-22 Thread Kamlesh Kumar
--- gcc/cp/mangle.c| 3 ++- gcc/testsuite/g++.dg/cpp0x/nullptr27.C | 2 +- gcc/testsuite/g++.dg/cpp0x/pr91979.C | 15 +++ libiberty/cp-demangle.c| 10 ++ libiberty/testsuite/demangle-expected | 4 5 files changed, 32 insertions

Re: [PATCH][PR91979] Incorrect mangling for non-template-argument nullptr expression

2019-10-22 Thread kamlesh kumar
On Tue, Oct 22, 2019 at 10:53 PM kamlesh kumar wrote: > > diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c > index a9333b8..334610c 100644 > --- a/gcc/cp/mangle.c > +++ b/gcc/cp/mangle.c > @@ -3400,7 +3400,8 @@ write_template_arg_literal (const tree value) >

Re: [PATCH][PR91979] Incorrect mangling for non-template-argument nullptr expression

2019-10-22 Thread kamlesh kumar
ooIiEfvENKUlT_E_clIcEEDaS0_EN1X2fnEv Foo()::{lambda(auto:1)#1}::operator()(char) const::X::fn() Foo()::{lambda(auto:1)#1}::operator()(char) const::X::fn +#PR91979 demangling nullptr expression + +_Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE +void foo<(void*)0>(enable_if<((void*)0)==((decl

Re: [PATCH][PR91979] Incorrect mangling for non-template-argument nullptr expression

2019-10-22 Thread kamlesh kumar
attached patch file. On Tue, Oct 22, 2019 at 10:00 PM kamlesh kumar wrote: > > bootstrap and regtested on x86_64. > > Changelog: > gcc > ------ > 2019-10-22 Kamlesh Kumar > > PR c++/91979 - mangling nullptr expression > * mangle.c (write_templat

[PATCH][PR91979] Incorrect mangling for non-template-argument nullptr expression

2019-10-22 Thread kamlesh kumar
bootstrap and regtested on x86_64. Changelog: gcc -- 2019-10-22 Kamlesh Kumar PR c++/91979 - mangling nullptr expression * mangle.c (write_template_arg_literal): Handle nullptr mangling. * testsuite/g++.dg/cpp0x/nullptr27.C: Modify Test. * testsuite

[PATCH][PR83534] C++17: typeinfo for noexcept function lacks noexcept information

2019-10-04 Thread kamlesh kumar
bootstrapped and regtested on x86_64. ChangeLog: 2019-10-04 Kamlesh Kumar * rtti.c (get_tinfo_decl_dynamic): Do not call TYPE_MAIN_VARIANT for function. (get_typeid): Likewise. * g++.dg/rtti/pr83534.C: New Test. diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c

[PATCH][PR89924] [missed-optimization] Function not de-virtualized within the same TU

2019-09-26 Thread kamlesh kumar
This patch resolves subjected issue. bootstrapped and regtested on x86_64. ChangeLog: 2019-09-26 Kamlesh Kumar PR ipa/89924 * ipa-polymorphic-call.c (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Updated outer_type. * g++.dg/opt/pr89924

[Patch][PR91504] Inlining misses some logical operation folding

2019-08-26 Thread kamlesh kumar
2019-08-26 Kamlesh Kumar * gcc/match.pd: Added simplification pattern. * gcc.dg/tree-ssa/pr91504.c: New test. diff --git a/gcc/match.pd b/gcc/match.pd index 93dcef9..b3734f8 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -831,6 +831,11

[PATCH] [PR81810] unused strcpy to a local buffer not eliminated

2019-08-21 Thread kamlesh kumar
Hi , This patch include fix for PR81810 Bootstrapped/regtested on x86_64-linux, ok for trunk? Thanks ./Kamlesh 2019-08-21 Kamlesh Kumar PR tree-optimization/81810 * tree-ssa-dse.c (dse_dom_walker::dse_optimize_stmt): Added BUILT_IN_STRCPY to consider for dse