[PATCH, wwwdocs] Update on existence of free emulators for alpha, VAX
As far as I can tell, alpha can be emulated by QEMU. VAX has SIMH. (Perhaps I should mention it somewhere? :)) Index: backends.html === RCS file: /cvs/gcc/wwwdocs/htdocs/backends.html,v retrieving revision 1.84 diff -u -r1.84 backends.html --- backends.html 18 Jan 2019 11:52:12 - 1.84 +++ backends.html 31 Mar 2019 08:00:23 - @@ -69,7 +69,7 @@ Target | HMSLQNFICBD lqrcpbfmgiates ---+--- aarch64| Qq b gia s -alpha | ?? Q Cq mgi e +alpha | ? Q Cq mgi e arc| B b gia arm| b ia s avr|L FIl cp g @@ -116,7 +116,7 @@ tilegx | S Q Cq gi e tilepro| S F C gi e v850 | g a s -vax| M?I c b i e +vax| M I c b i e visium | B g t s xtensa | C
Re: [PATCH] correct maximum valid alignment in error message (PR 89812)
Hi Jeff, > On 3/26/19 4:49 PM, Rainer Orth wrote: >> Hi Jakub, >> >>> On Mon, Mar 25, 2019 at 11:41:35AM -0600, Jeff Law wrote: > PR c/89812 - incorrect maximum in error: requested alignment > ‘536870912’ exceeds maximum 2147483648 > > gcc/c-family/ChangeLog: > > PR c/89812 > * c-common.c (check_user_alignment): Rename local. Correct maximum > alignment in diagnostic. Avoid assuming argument fits in SHWI, > convert it to UHWI when it fits. > > gcc/testsuite/ChangeLog: > > PR c/89812 > * gcc.dg/attr-aligned-3.c: New test. OK >>> >>> The test FAILs on all 32-bit targets (where __UINT64_TYPE__ is unsigned long >>> long) due to -pedantic-errors, and I bet will fail on all non-ELF targets on >>> AVR, because only config/elfos.h defines 1 << 28 as MAX_OFILE_ALIGNMENT (in >>> bytes) and the test relies on exactly that value, nothing else. >>> >>> Fixed thusly, tested on x86_64-linux (-m32/-m64), ok for trunk? >>> >>> If we have some elf targets that still don't use elfos.h, we might need to >>> add them next to avr too. >> >> FWIW, adding *-*-solaris2.* to the target list lets the test also PASS >> on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (32 and 64-bit each). > Go for it. And ISTM that this kind of change should be well within the > space where you should be able to commit w/o approvals :-) I know and meant to install the patch unless Jakub incorporated it into his. However, I preferred to leave approval of his patch to a subject-matter expert which hadn't happened by the time I sent my comment :-) Here's what I've installed now. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University 2019-03-31 Rainer Orth * gcc.dg/attr-aligned-3.c: Enable on *-*-solaris2.*. # HG changeset patch # Parent 69acafd998407cc8b114107b6cefd6fdb5e5d369 Enable gcc.dg/attr-aligned-3.c on Solaris diff --git a/gcc/testsuite/gcc.dg/attr-aligned-3.c b/gcc/testsuite/gcc.dg/attr-aligned-3.c --- a/gcc/testsuite/gcc.dg/attr-aligned-3.c +++ b/gcc/testsuite/gcc.dg/attr-aligned-3.c @@ -2,7 +2,7 @@ exceeds maximum 2147483648 Limit to ELF targets that are known to use MAX_OFILE_ALIGNMENT (1 << 28) * BITS_PER_UNIT. - { dg-do compile { target { { *-*-elf* *-*-gnu* } && { ! avr*-*-* } } } } + { dg-do compile { target { { *-*-elf* *-*-gnu* *-*-solaris2.* } && { ! avr*-*-* } } } } { dg-require-effective-target size32plus } { dg-options "" } */
Re: [Patch, fortran] PR87127 - External function not recognised from within an associate block
Hi Paul, With your patch the error for the test gfortran.dg/pr88376.f90 is changed from Error: 'n' at (1) is not a function to Error: Specification function 'n' at (1) must be PURE TIA Dominique
Re: [Patch, fortran] PR87127 - External function not recognised from within an associate block
Hi Dominique, I discovered the same thing myself this morning. The patch was developed on 8-branch because my working trunk had a hefty patch in an intermediate state of development. I cleared it off,ready to do the commit, and discovered the change on regtesting. I am trying to think of a way in which to distinguish the two cases. Thanks Paul On Sun, 31 Mar 2019 at 10:33, Dominique d'Humières wrote: > > Hi Paul, > > With your patch the error for the test gfortran.dg/pr88376.f90 is changed from > > Error: 'n' at (1) is not a function > > to > > Error: Specification function 'n' at (1) must be PURE > > TIA > > Dominique -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein
[PATCH PR d/88462] Committed fix for run-time SIGSEGV in ModuleInfo.flags()
Hi, Patch fixes problems accessing ModuleInfo on SPARC. The current forced alignment is not at all necessary. Bootstrapped and regression tested on x86_64-linux-gnu. Committed to trunk as r270043. -- Iain --- gcc/d/ChangeLog: 2019-03-31 Iain Buclaw PR d/88462 * modules.cc (layout_moduleinfo_fields): Properly align ModuleInfo, instead of forcing alignment to be 1. --- diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc index a1fc534c3b6..e9bd44115f9 100644 --- a/gcc/d/modules.cc +++ b/gcc/d/modules.cc @@ -534,7 +534,9 @@ layout_moduleinfo_fields (Module *decl, tree type) layout_moduleinfo_field (make_array_type (Type::tchar, namelen), type, offset); - finish_aggregate_type (offset, 1, type, NULL); + size_t alignsize = MAX (TYPE_ALIGN_UNIT (type), + TYPE_ALIGN_UNIT (ptr_type_node)); + finish_aggregate_type (offset, alignsize, type, NULL); return type; }
[patch, fortran, committed] Add a few more debug functions
Hello world, I have just committed this patch as obvious to make debugging a bit easier. No user impact, the code compiles :-) Regards Thomas 2019-03-31 Thomas Koenig * dump-parse-tree.c (debug): Add for symbol_attribute *, symbol_attribute and gfc_ref * arguments. Index: dump-parse-tree.c === --- dump-parse-tree.c (Revision 269895) +++ dump-parse-tree.c (Arbeitskopie) @@ -50,10 +50,26 @@ static void show_code (int, gfc_code *); static void show_symbol (gfc_symbol *); static void show_typespec (gfc_typespec *); +static void show_ref (gfc_ref *); +static void show_attr (symbol_attribute *, const char *); /* Allow dumping of an expression in the debugger. */ void gfc_debug_expr (gfc_expr *); +void debug (symbol_attribute *attr) +{ + FILE *tmp = dumpfile; + dumpfile = stderr; + show_attr (attr, NULL); + fputc ('\n', dumpfile); + dumpfile = tmp; +} + +void debug (symbol_attribute attr) +{ + debug (&attr); +} + void debug (gfc_expr *e) { FILE *tmp = dumpfile; @@ -79,6 +95,15 @@ debug (&ts); } +void debug (gfc_ref *p) +{ + FILE *tmp = dumpfile; + dumpfile = stderr; + show_ref (p); + fputc ('\n', dumpfile); + dumpfile = tmp; +} + void gfc_debug_expr (gfc_expr *e) {
Re: [PATCH] Add peephole2s to improve pr49095.c f{char,short,int,long}minus on ia32 (PR rtl-optimization/89865)
On 2019-03-30 8:37 a.m., Jeff Law wrote: On 3/30/19 4:21 AM, Uros Bizjak wrote: On 3/29/19, Jeff Law wrote: On 3/29/19 1:44 PM, Jakub Jelinek wrote: Hi! f{char,short,int,long}minus use a RMW instead of direct memory operation (regression from 8.3) on ia32. The problem is an extra register copy, which regcprop would fix up, but unfortunately peephole2 runs before regcprop. Also, in one of the existing peephole2s I've renumbered the operands so that we don't overwrite existing operands. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2019-03-29 Jakub Jelinek PR rtl-optimization/89865 * config/i386/i386.md (SWI12 peephole for mem {+,-,&,|,^}= x; mem != 0): Fix up operand numbers not to clash with the additional operands[4]. (peepholes for mem {+,-,&,|,^}= x; mem != 0): New peephole2s with extra register copy in the middle. * gcc.target/i386/pr49095.c: Adjust number of expected RMW spots on ia32. OK. One might ask if there's a way to share a bit of code here since there's a fair amount of duplication. But I'll trust that you've pondered that and decided it wasn't really worth the effort. I think that Vladimir n is looking into the PR. So, if RA can avoid register copies by itself, then these extra peepholes won't be needed. Let's ask Vladimir for his opinion. I know, but based on my own experience in this space, I suspect it's unlikely we'll have a clean solution for gcc-9 in the allocator. Yes, it is tricky. All these costs changes affect many targets and need a lot of testing. If you'd prefer to wait on installing the peepholes to hear from Vlad, just in case, that's fine with me. After several tries. I have a candidate patch. I'll test it on x86/ppc64/arm64. If everything is ok, I'll commit it. In any case, I report the results on Monday or Tuesday at worst.
[patch, fortran] Fix PR 87352, far too many deallocations
Hello world, the attached patch attempts to fix PR 87352, a 7/8/9 regression (where there were far too many deallocations in a derived type containing allocatable arrays) by making sure that no component is finalized more than once. This seemed to be a safer, and simpler, approach to me than to try to change where, and when double finalization might occur and when it might be safe to remove it. This might also cure PR 84487 but, of course, SPEC is closed source, so I cannot check. @Jeremy: Can you confirm that this fixes the excessive compile time and code size issue for you? OK for trunk and backporting? Regards Thomas 2019-03-31 Thomas Koenig PR fortran/87352 * gfortran.h (gfc_component): Add finalized field. * class.c (finalize_component): If the component is already finalized, return early. Set component->finalized on exit. 2019-03-31 Thomas Koenig PR fortran/87352 * gfortran.dg/finalize_28.f90: Adjust count of __builtin_free. * gfortran.dg/finalize_33.f90: Likewise. * gfortran.dg/finalize_34.f90: New test.
Re: [patch, fortran] Fix PR 87352, far too many deallocations
Am 31.03.19 um 18:10 schrieb Thomas Koenig: Hello world, the attached patch Now really attached. ! { dg-do compile } ! { dg-additional-options "-fdump-tree-original" } ! PR 87352 - this used to cause an excessive number of deallocations. module testmodule implicit none public type :: evtlist_type real, allocatable, dimension(:) :: p1 real, allocatable, dimension(:) :: p2 real, allocatable, dimension(:) :: p3 real, allocatable, dimension(:) :: p4 end type evtlist_type type :: evtlistlist_type type(evtlist_type) :: evtlist(1:1) end type evtlistlist_type end module testmodule program main use testmodule type(evtlist_type), dimension(10) :: a end program main ! { dg-final { scan-tree-dump-times "__builtin_free" 8 "original" } } Index: fortran/gfortran.h === --- fortran/gfortran.h (Revision 269895) +++ fortran/gfortran.h (Arbeitskopie) @@ -1094,6 +1094,7 @@ typedef struct gfc_component struct gfc_typebound_proc *tb; /* When allocatable/pointer and in a coarray the associated token. */ tree caf_token; + bool finalized; } gfc_component; Index: fortran/class.c === --- fortran/class.c (Revision 269895) +++ fortran/class.c (Arbeitskopie) @@ -911,6 +911,9 @@ finalize_component (gfc_expr *expr, gfc_symbol *de if (!comp_is_finalizable (comp)) return; + if (comp->finalized) +return; + e = gfc_copy_expr (expr); if (!e->ref) e->ref = ref = gfc_get_ref (); @@ -1038,6 +1041,7 @@ finalize_component (gfc_expr *expr, gfc_symbol *de sub_ns); gfc_free_expr (e); } + comp->finalized = true; } Index: testsuite/gfortran.dg/finalize_28.f90 === --- testsuite/gfortran.dg/finalize_28.f90 (Revision 269895) +++ testsuite/gfortran.dg/finalize_28.f90 (Arbeitskopie) @@ -21,4 +21,4 @@ contains integer, intent(out) :: edges(:,:) end subroutine coo_dump_edges end module coo_graphs -! { dg-final { scan-tree-dump-times "__builtin_free" 6 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 5 "original" } } Index: testsuite/gfortran.dg/finalize_33.f90 === --- testsuite/gfortran.dg/finalize_33.f90 (Revision 269895) +++ testsuite/gfortran.dg/finalize_33.f90 (Arbeitskopie) @@ -116,4 +116,4 @@ contains ! (iii) mci_template end program main_ut ! { dg-final { scan-tree-dump-times "__builtin_malloc" 17 "original" } } -! { dg-final { scan-tree-dump-times "__builtin_free" 20 "original" } } +! { dg-final { scan-tree-dump-times "__builtin_free" 19 "original" } }
Re: [committed][PR rtl-optimization/87761] Limited iteration in regcprop to pick up secondary opportunities
On 3/28/19 2:55 AM, Richard Biener wrote: > On Wed, Mar 27, 2019 at 4:26 PM Jeff Law wrote: >> >> On 3/27/19 8:36 AM, Jakub Jelinek wrote: >>> On Sun, Mar 24, 2019 at 09:20:07AM -0600, Jeff Law wrote: However, I'm increasingly of the opinion that MIPS targets need to drop off the priority platform list. Given the trajectory I see for MIPS based processors in industry, it's really hard to justify spending this much time on them, particularly for low priority code quality issues. >>> >>> Besides what has been discussed on IRC for the PR89826 fix, that we really >>> need a df_analyze before processing the first block, because otherwise we >>> can't rely on the REG_UNUSED notes in the IL, I see some other issues, but I >>> admit I don't know much about df nor regcprop. >> RIght. I plan to commit that today along with the test reordering you >> pointed out. >> >>> >>> 1) the df_analyze () after every (successful) processing of a basic block >>> is IMHO way too expensive, I would be very surprised if df_analyze () isn't >>> quadratic in number of basic blocks and so one could construct testcases >>> with millions of basic blocks and at least one regcprop change in each bb >>> and get at cubic complexity (correct me if I'm wrong, and I'm aware of the >>> 95% bbs you said won't have any changes at all) >> I'm going to look this further today. > > Look at > https://gcc.opensuse.org/gcc-old/c++bench-czerny/random/random-performance-latest > and you'll see multiple testcases with 'hard reg cprop' >10% compile-time. > It's indeed a hog for no good reason. I stand corrected. That's really a surprise. I looked at today's report and don't see anything over 1%, so Jakub's improvements really helped.
Investicní príležitost
Zdravím, Obsah této posty je velmi duverný a legální. Jmenuji se Peter Wong, pracuji s bankou tady v Hong Kongu. Rozhodl jsem se vás kontaktovat pro moznost investovat do lukrativního podnikání ve va?í zemi. Jsem ochoten Vám nabídnout 40% investicního zisku jako muj obchodní partner. Nase banka nabízí rychlý úver s nízkou úrokovou sazbou bez po?adovaného zajistení. Pokud máte zájem, odpovezte prosím na více informací na mém soukromém e-mailu: pw178...@gmail.com S pozdravem: Peter Wong This email was sent by the shareware version of Postman Professional.
Re: [Patch, fortran] PR83515, PR85797 - ICE in gfc_element_size
Committed to trunk as svn rev. 270045. Since the patch is considered safe, I also committed to open branches (7/8). Thanks for the review! Harald On 03/20/19 23:20, Harald Anlauf wrote: > The PRs originated in gfc_element_size lacking a treatment of > procedure pointers, which has been added. The testcase is currently > a pure compile test. When a reduced run-time test for PR83515 > becomes available, it will be added to the testsuite. > > Regtested on x86_64-pc-linux-gnu. > > OK for trunk? > > Thanks, > Harald > > 2019-03-20 Harald Anlauf > > PR fortran/83515 > PR fortran/85797 > * trans-types.c (gfc_typenode_for_spec): Handle conversion for > procedure pointers. > * target-memory.c (gfc_element_size): Handle size determination > for procedure pointers. > > 2019-03-20 Harald Anlauf > > PR fortran/83515 > PR fortran/85797 > * gfortran.dg/pr85797.f90: New test. >
New Swedish PO file for 'gcc' (version 9.1-b20190324)
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file, 'gcc-9.1-b20190324.sv.po', has just now been sent to you in a separate email.) All other PO files for your package are available in: https://translationproject.org/latest/gcc/ Please consider including all of these in your next release, whether official or a pretest. Whenever you have a new distribution with a new version number ready, containing a newer POT file, please send the URL of that distribution tarball to the address below. The tarball may be just a pretest or a snapshot, it does not even have to compile. It is just used by the translators when they need some extra translation context. The following HTML page has been updated: https://translationproject.org/domain/gcc.html If any question arises, please contact the translation coordinator. Thank you for all your work, The Translation Project robot, in the name of your translation coordinator.
[PATCH] handle strings as template arguments (PR 47488, 89833, 89876)
To fix PR 89833, a P1 regression, the attached patch tries to handle string literals as C++ 2a non-type template arguments by treating them the same as brace enclosed initializer lists (where the latter are handled correctly). The solution makes sure equivalent forms of array initializers such as for char[5]: "\0\1\2" "\0\1\2\0" { 0, 1, 2 } { 0, 1, 2, 0 } { 0, 1, 2, 0, 0 } are treated as the same, both for overloading and mangling. Ditto for the following equivalent forms: "" "\0" "\0\0\0\0" { } { 0 } { 0, 0, 0, 0, 0 } and for these of struct { char a[5], b[5], c[5]; }: { {0,0,0,0,0}, {0,0,0,0}, {0,0,0} } { { 0 }, { } } { "" } Since this is not handled correctly by the current code (see PR 89876 for a test case) the patch also fixes that. I'm not at all confident the handling of classes with user-defined constexpr ctors is 100% correct. (I use triviality to constrain the solution for strings but that was more of an off-the-cuff guess than a carefully considered decision). The g++.dg/abi/mangle71.C test is all I've got in terms of verifying it works correctly. I'm quite sure the C++ 2a testing could stand to be beefed up. The patch passes x86_64-linux bootstrap and regression tests. There are a few failures in check-c++-all tests that don't look related to the changes (I see them with an unpatched GCC as well): g++.dg/spellcheck-macro-ordering-2.C g++.dg/cpp0x/auto52.C g++.dg/cpp1y/auto-neg1.C g++.dg/other/crash-9.C Martin PR c++/89833 - sorry, unimplemented: string literal in function template signature gcc/cp/ChangeLog: PR c++/89833 * decl.c (reshape_init_array_1): Strip trailing zero-initializers from arrays of trivial type and known size. * mangle.c (write_expression): Convert braced initializer lists to STRING_CSTs. (write_expression): Trim trailing zero-initializers from arrays of trivial type. (write_template_arg_literal): Mangle strings the same as braced initializer lists. Index: gcc/cp/decl.c === --- gcc/cp/decl.c (revision 270037) +++ gcc/cp/decl.c (working copy) @@ -5799,6 +5799,9 @@ reshape_init_array_1 (tree elt_type, tree max_inde max_index_cst = tree_to_uhwi (fold_convert (size_type_node, max_index)); } + /* Set to the index of the last element with a non-zero initializer. + Initializers for elements past this one can be dropped. */ + unsigned HOST_WIDE_INT last_nonzero = -1; /* Loop until there are no more initializers. */ for (index = 0; d->cur != d->end && (!sized_array_p || index <= max_index_cst); @@ -5817,11 +5820,28 @@ reshape_init_array_1 (tree elt_type, tree max_inde if (!TREE_CONSTANT (elt_init)) TREE_CONSTANT (new_init) = false; + if (!initializer_zerop (elt_init)) + last_nonzero = index; + /* This can happen with an invalid initializer (c++/54501). */ if (d->cur == old_cur && !sized_array_p) break; } + if (sized_array_p && trivial_type_p (elt_type)) +{ + /* Strip trailing zero-initializers from an array of a trivial + type of known size. They are redundant and get in the way + of telling them apart from those with implicit zero value. */ + unsigned HOST_WIDE_INT nelts = CONSTRUCTOR_NELTS (new_init); + if (last_nonzero > nelts) + nelts = 0; + else if (last_nonzero < nelts - 1) + nelts = last_nonzero + 1; + + vec_safe_truncate (CONSTRUCTOR_ELTS (new_init), nelts); +} + return new_init; } Index: gcc/cp/mangle.c === --- gcc/cp/mangle.c (revision 270037) +++ gcc/cp/mangle.c (working copy) @@ -3136,18 +3136,48 @@ write_expression (tree expr) } else if (code == CONSTRUCTOR) { - vec *elts = CONSTRUCTOR_ELTS (expr); - unsigned i; tree val; + bool braced_init = BRACE_ENCLOSED_INITIALIZER_P (expr); + tree etype = TREE_TYPE (expr); - if (BRACE_ENCLOSED_INITIALIZER_P (expr)) + if (braced_init) write_string ("il"); else { write_string ("tl"); - write_type (TREE_TYPE (expr)); + write_type (etype); } - FOR_EACH_CONSTRUCTOR_VALUE (elts, i, val) - write_expression (val); + + if (!initializer_zerop (expr) || !trivial_type_p (etype)) + { + /* Convert braced initializer lists to STRING_CSTs so that + A<"Foo"> mangles the same as A<{'F', 'o', 'o', 0}> while + still using the latter mangling for strings that + originated as braced initializer lists. */ + expr = braced_lists_to_strings (etype, expr); + + if (TREE_CODE (expr) == CONSTRUCTOR) + { + vec *elts = CONSTRUCTOR_ELTS (expr); + unsigned last_nonzero = -1, i; + tree val; + + FOR_EACH_CONSTRUCTOR_VALUE (elts, i, val) + if (!initializer_zerop (val)) + last_nonzero = i; + + FOR_EACH_CONSTRUCTOR_VALUE (elts, i, val) + { + if (i > last_nonzero) + break; + write_expression (
[PATCH PR89725]Handle DR's access functions of loops not in DDR's loop_nest
Hi, As described in comments of PR89725, this patch fixes out-of-bound access during computing classic dist/dir vector for DDR. Basically it does two things: A) Handle relevant chrec of outer loop in multivariate access function as invariant symbol during DDR analysis; B) Bypass relevant univariate access functions. Bootstrap and test on x86_64, any comments? Thanks, bin 2019-04-01 Bin Cheng PR tree-optimization/89725 * tree-chrec.c (chrec_contains_symbols): New parameter. Handle outer loop's chrec as invariant symbol. * tree-chrec.h (chrec_contains_symbols): New parameter. * tree-data-ref.c (analyze_miv_subscript): Pass new argument. (build_classic_dist_vector_1, add_other_self_distances): Bypass access function of loops not in DDR's loop_nest. * tree-data-ref.h (index_in_loop_nest): New assertion. 2018-04-01 Bin Cheng PR tree-optimization/89725 * gcc/testsuite/gcc.dg/tree-ssa/pr89725.c: New test. 0001-pr89725.patch Description: Binary data
Re: [PATCH 2/7] [NDS32] Fix testsuite for nds32 target
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Kito Cheng > > Chung-Ju Wu > Shiva Chen > > ChangeLog: > > gcc/testsuite/ > * gcc.c-torture/execute/20010122-1.c: Add -malways-save-lp for > nds32. > * gcc.c-torture/execute/pr60822.c: Add -mcmodel=large for nds32. > * gcc.c-torture/execute/pr79286.c: Ditto. > * gcc.dg/graphite/interchange-15.c: Ditto. > * gcc.dg/graphite/interchange-3.c: Ditto. > * gcc.dg/graphite/interchange-7.c: Ditto. > * gcc.dg/graphite/interchange-9.c: Ditto. > * gcc.dg/graphite/interchange-mvt.c: Ditto. > * gcc.dg/graphite/uns-interchange-15.c: Ditto. > * gcc.dg/graphite/uns-interchange-9.c: Ditto. > * gcc.dg/graphite/uns-interchange-mvt.c: Ditto. > * gcc.dg/lower-subreg-1.c: Skip nds32. > * gcc.dg/stack-usage-1.c: Add -fno-omit-frame-pointer for nds32. > --- > gcc/testsuite/gcc.c-torture/execute/20010122-1.c| 1 + > gcc/testsuite/gcc.c-torture/execute/pr60822.c | 1 + > gcc/testsuite/gcc.c-torture/execute/pr79286.c | 1 + > gcc/testsuite/gcc.dg/graphite/interchange-15.c | 1 + > gcc/testsuite/gcc.dg/graphite/interchange-3.c | 1 + > gcc/testsuite/gcc.dg/graphite/interchange-7.c | 1 + > gcc/testsuite/gcc.dg/graphite/interchange-9.c | 1 + > gcc/testsuite/gcc.dg/graphite/interchange-mvt.c | 1 + > gcc/testsuite/gcc.dg/graphite/uns-interchange-15.c | 1 + > gcc/testsuite/gcc.dg/graphite/uns-interchange-9.c | 1 + > gcc/testsuite/gcc.dg/graphite/uns-interchange-mvt.c | 1 + > gcc/testsuite/gcc.dg/lower-subreg-1.c | 2 +- > gcc/testsuite/gcc.dg/stack-usage-1.c| 1 + > 13 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c > b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c > index 4eeb8c7..6cd02bc 100644 > --- a/gcc/testsuite/gcc.c-torture/execute/20010122-1.c > +++ b/gcc/testsuite/gcc.c-torture/execute/20010122-1.c > @@ -1,4 +1,5 @@ > /* { dg-skip-if "requires frame pointers" { *-*-* } > "-fomit-frame-pointer" "" } */ > +/* { dg-additional-options "-malways-save-lp" { target nds32*-*-* } } */ > /* { dg-require-effective-target return_address } */ > > extern void exit (int); > diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60822.c > b/gcc/testsuite/gcc.c-torture/execute/pr60822.c > index dcd2447..f658827 100644 > --- a/gcc/testsuite/gcc.c-torture/execute/pr60822.c > +++ b/gcc/testsuite/gcc.c-torture/execute/pr60822.c > @@ -1,4 +1,5 @@ > /* { dg-require-effective-target int32plus } */ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > struct X { > char fill0[80]; > int a; > diff --git a/gcc/testsuite/gcc.c-torture/execute/pr79286.c > b/gcc/testsuite/gcc.c-torture/execute/pr79286.c > index e6d0e93..fef026d 100644 > --- a/gcc/testsuite/gcc.c-torture/execute/pr79286.c > +++ b/gcc/testsuite/gcc.c-torture/execute/pr79286.c > @@ -1,3 +1,4 @@ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > int a = 0, c = 0; > static int d[][8] = {}; > > diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-15.c > b/gcc/testsuite/gcc.dg/graphite/interchange-15.c > index 7410f29..85d3645 100644 > --- a/gcc/testsuite/gcc.dg/graphite/interchange-15.c > +++ b/gcc/testsuite/gcc.dg/graphite/interchange-15.c > @@ -1,4 +1,5 @@ > /* { dg-require-effective-target size32plus } */ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > > #define DEBUG 0 > #if DEBUG > diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-3.c > b/gcc/testsuite/gcc.dg/graphite/interchange-3.c > index 4aec824..7e60385 100644 > --- a/gcc/testsuite/gcc.dg/graphite/interchange-3.c > +++ b/gcc/testsuite/gcc.dg/graphite/interchange-3.c > @@ -1,4 +1,5 @@ > /* { dg-require-effective-target size32plus } */ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > > /* Formerly known as ltrans-3.c */ > > diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-7.c > b/gcc/testsuite/gcc.dg/graphite/interchange-7.c > index 50f7dd7..5be43a5 100644 > --- a/gcc/testsuite/gcc.dg/graphite/interchange-7.c > +++ b/gcc/testsuite/gcc.dg/graphite/interchange-7.c > @@ -1,5 +1,6 @@ > /* { dg-require-effective-target size32plus } */ > /* { dg-require-stack-size "8*111*" } */ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > > /* Formerly known as ltrans-8.c */ > > diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-9.c > b/gcc/testsuite/gcc.dg/graphite/interchange-9.c > index 88a3578..dd3bc9f 100644 > --- a/gcc/testsuite/gcc.dg/graphite/interchange-9.c > +++ b/gcc/testsuite/gcc.dg/graphite/interchange-9.c > @@ -1,4 +1,5 @@ > /* { dg-require-effective-target size32plus } */ > +/* { dg-options "-mcmodel=large" { target nds32*-*-* } } */ > > #define DEBUG 0 > #if DEBUG > diff --git a/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c > b/gcc/testsuite/gcc.dg/graphite/interchange-mvt.c > index c6543ec..c304a30 100644
Re: [PATCH 1/7] [NDS32] Provide one valid nds32 assembly instruction to check assembler debugging options and features.
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Chung-Ju Wu > > Chung-Ju Wu > > ChangeLog > gcc/ > * configure.ac: Add nds32 target for dwarf2 debug_line checking. > * configure: Regenerated. > --- > gcc/configure| 2 +- > gcc/configure.ac | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/configure b/gcc/configure > index ba9c3dc..3dcf775 100755 > --- a/gcc/configure > +++ b/gcc/configure > @@ -27813,7 +27813,7 @@ esac > # version to the per-target configury. > case "$cpu_type" in >aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | > m68k \ > - | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu > \ > + | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | > sparc | spu \ >| tilegx | tilepro | visium | xstormy16 | xtensa) > insn="nop" > ;; > diff --git a/gcc/configure.ac b/gcc/configure.ac > index b49670a..51f520c 100644 > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > @@ -4941,7 +4941,7 @@ esac > # version to the per-target configury. > case "$cpu_type" in >aarch64 | alpha | arc | arm | avr | bfin | cris | csky | i386 | m32c | > m68k \ > - | microblaze | mips | nios2 | pa | riscv | rs6000 | score | sparc | spu > \ > + | microblaze | mips | nds32 | nios2 | pa | riscv | rs6000 | score | > sparc | spu \ >| tilegx | tilepro | visium | xstormy16 | xtensa) > insn="nop" > ;; > -- > 1.8.3.1 > >
Re: [PATCH 3/7] [NDS32] Rewrite PIC/TLS patterns.
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Monk Chiang > > Monk Chiang > Kito Cheng > Shiva Chen > > ChangeLog > gcc/ > * config/nds32/nds32-md-auxiliary.c (nds32_legitimize_pic_address): > Use new PIC pattern. > (nds32_legitimize_tls_address): Use new TLS pattern. > (nds32_output_symrel): New. > * config/nds32/nds32-protos.h (nds32_output_symrel): Declare. > (nds32_alloc_relax_group_id): Ditto. > * config/nds32/nds32-relax-opt.c (nds32_alloc_relax_group_id): > New. > (nds32_group_insns): Use nds32_alloc_relax_group_id instead of > use relax_group_id. > (nds32_group_tls_insn): Ditto. > (nds32_group_float_insns): Ditto. > * config/nds32/nds32.md (tls_le): New. > (sym_got): Ditto. > > gcc/testsuite/ > > * gcc.target/nds32/pic.c: New. > * gcc.target/nds32/tls-le.c: Ditto. > --- > gcc/config/nds32/nds32-md-auxiliary.c | 43 > ++--- > gcc/config/nds32/nds32-protos.h | 3 +++ > gcc/config/nds32/nds32-relax-opt.c | 19 --- > gcc/config/nds32/nds32.md | 27 + > gcc/testsuite/gcc.target/nds32/pic.c| 42 > > gcc/testsuite/gcc.target/nds32/tls-le.c | 17 + > 6 files changed, 128 insertions(+), 23 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/nds32/pic.c > create mode 100644 gcc/testsuite/gcc.target/nds32/tls-le.c > > diff --git a/gcc/config/nds32/nds32-md-auxiliary.c > b/gcc/config/nds32/nds32-md-auxiliary.c > index 3c510cf..35fcc64 100644 > --- a/gcc/config/nds32/nds32-md-auxiliary.c > +++ b/gcc/config/nds32/nds32-md-auxiliary.c > @@ -3493,6 +3493,7 @@ nds32_legitimize_pic_address (rtx x) >rtx addr = x; >rtx reg = gen_reg_rtx (Pmode); >rtx pat; > + int relax_group_id = nds32_alloc_relax_group_id (); > >if (GET_CODE (x) == LABEL_REF >|| (GET_CODE (x) == SYMBOL_REF > @@ -3501,16 +3502,14 @@ nds32_legitimize_pic_address (rtx x) > { >addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, x), UNSPEC_GOTOFF); >addr = gen_rtx_CONST (SImode, addr); > - emit_insn (gen_sethi (reg, addr)); > - emit_insn (gen_lo_sum (reg, reg, addr)); > + emit_insn (gen_sym_got (reg, addr, GEN_INT (relax_group_id))); >x = gen_rtx_PLUS (Pmode, reg, pic_offset_table_rtx); > } >else if (GET_CODE (x) == SYMBOL_REF) > { >addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, x), UNSPEC_GOT); >addr = gen_rtx_CONST (SImode, addr); > - emit_insn (gen_sethi (reg, addr)); > - emit_insn (gen_lo_sum (reg, reg, addr)); > + emit_insn (gen_sym_got (reg, addr, GEN_INT (relax_group_id))); > >x = gen_const_mem (SImode, gen_rtx_PLUS (Pmode, > pic_offset_table_rtx, >reg)); > @@ -3534,8 +3533,7 @@ nds32_legitimize_pic_address (rtx x) > pat = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), UNSPEC_GOTOFF); > pat = gen_rtx_PLUS (Pmode, pat, op1); > pat = gen_rtx_CONST (Pmode, pat); > - emit_insn (gen_sethi (reg, pat)); > - emit_insn (gen_lo_sum (reg, reg, pat)); > + emit_insn (gen_sym_got (reg, pat, GEN_INT (relax_group_id))); > x = gen_rtx_PLUS (Pmode, reg, pic_offset_table_rtx); > } >else if (GET_CODE (op0) == SYMBOL_REF > @@ -3544,8 +3542,8 @@ nds32_legitimize_pic_address (rtx x) > /* This is a constant offset from a @GOT symbol reference. */ > addr = gen_rtx_UNSPEC (SImode, gen_rtvec (1, op0), UNSPEC_GOT); > addr = gen_rtx_CONST (SImode, addr); > - emit_insn (gen_sethi (reg, addr)); > - emit_insn (gen_lo_sum (reg, reg, addr)); > + emit_insn (gen_sym_got (reg, addr, GEN_INT (relax_group_id))); > + > addr = gen_const_mem (SImode, gen_rtx_PLUS (Pmode, > pic_offset_table_rtx, > reg)); > @@ -3668,6 +3666,7 @@ nds32_legitimize_tls_address (rtx x) >rtx tmp_reg; >rtx tp_reg = gen_rtx_REG (Pmode, TP_REGNUM); >rtx pat, insns, reg0; > + int relax_group_id = nds32_alloc_relax_group_id (); > >if (GET_CODE (x) == SYMBOL_REF) > switch (SYMBOL_REF_TLS_MODEL (x)) > @@ -3685,7 +3684,7 @@ nds32_legitimize_tls_address (rtx x) > reg0 = gen_rtx_REG (Pmode, 0); > /* If we can confirm all clobber reigsters, it doesn't have to use > call >instruction. */ > - insns = emit_call_insn (gen_tls_desc (pat, GEN_INT (0))); > + insns = emit_call_insn (gen_tls_desc (pat, GEN_INT > (relax_group_id))); > use_reg (&CALL_INSN_FUNCTION_USAGE (insns), pic_offset_table_rtx); > RTL_CONST_CALL_P (insns) = 1; > tmp_reg = gen_reg_rtx (SImode); > @@ -3697,7 +3696,7 @@ nds32_legitimize_tls_address (rtx x) > pat = gen_rtx_UNSPEC (SIm
Re: [PATCH 4/7] [NDS32] nds32*-linux target using init_array/finit_array for ctor/dtor.
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Monk Chiang > > Monk Chiang > > ChangeLog > > * config.gcc (nds32*-*-linux*): Set gcc_cv_initfini_array to yes. > --- > gcc/config.gcc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/config.gcc b/gcc/config.gcc > index 3eb2e80..a6d63dd 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -2486,6 +2486,7 @@ nds32*-*-*) > nds32*-*-linux*) > tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h > glibc-stdint.h nds32/linux.h nds32/nds32_intrinsic.h" > tmake_file="${tmake_file} nds32/t-nds32 nds32/t-linux" > + gcc_cv_initfini_array=yes > ;; > esac > > -- > 1.8.3.1 > >
Re: [PATCH 6/7] [NDS32] Handle subreg correctly in wext_odd_dep_p.
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Kito Cheng > > Kito Cheng > Shiva Chen > > ChangeLog: > gcc/ > * config/nds32/nds32-pipelines-auxiliary.c (wext_odd_dep_p): > Handle subreg. > > gcc/testsuite > * gcc.target/nds32/wext-dep.c: New. > --- > gcc/config/nds32/nds32-pipelines-auxiliary.c | 16 > gcc/testsuite/gcc.target/nds32/wext-dep.c| 11 +++ > 2 files changed, 23 insertions(+), 4 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/nds32/wext-dep.c > > diff --git a/gcc/config/nds32/nds32-pipelines-auxiliary.c > b/gcc/config/nds32/nds32-pipelines-auxiliary.c > index 0c043d4..07ba037 100644 > --- a/gcc/config/nds32/nds32-pipelines-auxiliary.c > +++ b/gcc/config/nds32/nds32-pipelines-auxiliary.c > @@ -363,14 +363,19 @@ wext_odd_dep_p (rtx insn, rtx def_reg) > return reg_overlap_p (def_reg, use_reg); > >gcc_assert (REG_P (def_reg) || GET_CODE (def_reg) == SUBREG); > - gcc_assert (REG_P (use_reg)); > + gcc_assert (REG_P (use_reg) || GET_CODE (use_reg) == SUBREG); > >if (REG_P (def_reg)) > { > - if (!TARGET_BIG_ENDIAN) > - return REGNO (def_reg) == REGNO (use_reg) + 1; > + if REG_P (use_reg) > + { > + if (!TARGET_BIG_ENDIAN) > + return REGNO (def_reg) == REGNO (use_reg) + 1; > + else > + return REGNO (def_reg) == REGNO (use_reg); > + } >else > - return REGNO (def_reg) == REGNO (use_reg); > + return true; > } > >if (GET_CODE (def_reg) == SUBREG) > @@ -378,6 +383,9 @@ wext_odd_dep_p (rtx insn, rtx def_reg) >if (!reg_overlap_p (def_reg, use_reg)) > return false; > > + if (GET_CODE (use_reg) == SUBREG) > + return true; > + >if (!TARGET_BIG_ENDIAN) > return SUBREG_BYTE (def_reg) == 4; >else > diff --git a/gcc/testsuite/gcc.target/nds32/wext-dep.c > b/gcc/testsuite/gcc.target/nds32/wext-dep.c > new file mode 100644 > index 000..2af04d0 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/nds32/wext-dep.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile } */ > +/* { dg-options "-mext-dsp -mcpu=n15" { target nds32*-*-* } } */ > + > +/* The test case check that wext_odd_dep_p in nds32-pipelines-auxiliary.c > + could handle the use_reg is SUBREG. */ > +typedef long long T; > +typedef T vl_t __attribute__((vector_size(2 * sizeof (T; > + > +void foo(vl_t *a, vl_t *b, int c) { > + *a = *b >> c; > +} > -- > 1.8.3.1 > >
Re: [PATCH 5/7] [NDS32] Refine force unwind, linux kernel only using RT_SIGRETURN.
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Monk Chiang > > Monk Chiang > > ChangeLog > libgcc/ > * config/nds32/linux-unwind.h (SIGRETURN): Remove. > (RT_SIGRETURN): Update. > (nds32_fallback_frame_state): Update. > --- > libgcc/config/nds32/linux-unwind.h | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/libgcc/config/nds32/linux-unwind.h > b/libgcc/config/nds32/linux-unwind.h > index 0c4df4dd..adb6f9f 100644 > --- a/libgcc/config/nds32/linux-unwind.h > +++ b/libgcc/config/nds32/linux-unwind.h > @@ -42,8 +42,7 @@ struct _rt_sigframe { >struct ucontext_t uc; > }; > > -#define SIGRETURN 0xeb0e0a64 > -#define RT_SIGRETURN 0xab150a64 > +#define RT_SIGRETURN 0x8b00f044 > > #define MD_FALLBACK_FRAME_STATE_FOR nds32_fallback_frame_state > > @@ -74,16 +73,14 @@ nds32_fallback_frame_state (struct _Unwind_Context > *context, > >/* Check if we are going through a signal handler. > See arch/nds32/kernel/signal.c implementation. > - SWI_SYS_SIGRETURN-> (0xeb0e0a64) > - SWI_SYS_RT_SIGRETURN -> (0xab150a64) > FIXME: Currently we only handle little endian (EL) case. */ > - if (pc[0] == SIGRETURN || pc[0] == RT_SIGRETURN) > + if (pc[0] == RT_SIGRETURN) > { >/* Using '_sigfame' memory address to locate kernal's sigcontext. > The sigcontext structures in > arch/nds32/include/asm/sigcontext.h. */ >struct _rt_sigframe *rt_; >rt_ = context->cfa; > - sc_ = &rt_->sig.uc.uc_mcontext; > + sc_ = &rt_->uc.uc_mcontext; > } >else > return _URC_END_OF_STACK; > -- > 1.8.3.1 > >
Re: [PATCH 7/7] [NDS32] Fix nds32_split_ashiftdi3 with large shift amount
LGTM. Kito Cheng 於 2019年3月26日 週二 下午1:29寫道: > From: Kito Cheng > > Kito Cheng > Shiva Chen > > ChangeLog: > gcc/ > * config/nds32/nds32-md-auxiliary.c (nds32_split_ashiftdi3): > Fix wrong code gen with large shift amount. > > gcc/testsuite/ > * gcc.target/nds32/ashiftdi3.c: New. > --- > gcc/config/nds32/nds32-md-auxiliary.c | 21 ++--- > gcc/testsuite/gcc.target/nds32/ashiftdi3.c | 23 +++ > 2 files changed, 37 insertions(+), 7 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/nds32/ashiftdi3.c > > diff --git a/gcc/config/nds32/nds32-md-auxiliary.c > b/gcc/config/nds32/nds32-md-auxiliary.c > index 35fcc64..eadd841 100644 > --- a/gcc/config/nds32/nds32-md-auxiliary.c > +++ b/gcc/config/nds32/nds32-md-auxiliary.c > @@ -3304,15 +3304,22 @@ nds32_split_ashiftdi3 (rtx dst, rtx src, rtx > shiftamount) >ext_start = gen_reg_rtx (SImode); > >/* > -if (shiftamount < 32) > +# In fact, we want to check shift amonut is great than or equal > 32, > +# but in some corner case, the shift amount might be very large > value, > +# however we've defined SHIFT_COUNT_TRUNCATED, so GCC think we've > +# handle that correctly without any truncate. > +# so check the the condition of (shiftamount & 32) is most > +# safe way to do. > +if (shiftamount & 32) > + dst_low_part = 0 > + dst_high_part = src_low_part << shiftamount & 0x1f > +else >dst_low_part = src_low_part << shiftamout >dst_high_part = wext (src, 32 - shiftamount) ># wext can't handle wext (src, 32) since it's only take rb[0:4] ># for extract. >dst_high_part = shiftamount == 0 ? src_high_part : dst_high_part > -else > - dst_low_part = 0 > - dst_high_part = src_low_part << shiftamount & 0x1f > + >*/ > >emit_insn (gen_subsi3 (ext_start, > @@ -3331,11 +3338,11 @@ nds32_split_ashiftdi3 (rtx dst, rtx src, rtx > shiftamount) >emit_insn (gen_ashlsi3 (dst_high_part_g32, src_low_part, > new_shift_amout)); > > - emit_insn (gen_slt_compare (select_reg, shiftamount, GEN_INT (32))); > + emit_insn (gen_andsi3 (select_reg, shiftamount, GEN_INT (32))); > > - emit_insn (gen_cmovnsi (dst_low_part, select_reg, > + emit_insn (gen_cmovzsi (dst_low_part, select_reg, > dst_low_part_l32, dst_low_part_g32)); > - emit_insn (gen_cmovnsi (dst_high_part, select_reg, > + emit_insn (gen_cmovzsi (dst_high_part, select_reg, > dst_high_part_l32, dst_high_part_g32)); > } > } > diff --git a/gcc/testsuite/gcc.target/nds32/ashiftdi3.c > b/gcc/testsuite/gcc.target/nds32/ashiftdi3.c > new file mode 100644 > index 000..e3faff5 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/nds32/ashiftdi3.c > @@ -0,0 +1,23 @@ > +/* { dg-options "-mext-dsp" { target nds32 } } */ > + > +#include > +extern void abort (void); > + > +unsigned long long int ull; > + > +unsigned long long int __attribute__ ((noinline)) > +foo (unsigned long long int a, unsigned long long int b) > +{ > + return a << b; > +} > + > +int > +main (void) > +{ > + unsigned long long shiftamt = 0x45806aca; > + ull = foo(0xf, shiftamt); > + if (ull != 70368744176640) > +abort (); > + > + return 0; > +} > -- > 1.8.3.1 > >
Re: [PATCH] elf.c: initialize st_mode member
Ping. Thanks, On 2019年03月19日 16:37, mingli...@windriver.com wrote: From: Mingli Yu Initialize st_mode member to fix the below build failure when -Og included in compiler flag. | ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c: In function 'elf_is_symlink': | ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] return S_ISLNK (st.st_mode); Signed-off-by: Mingli Yu --- libbacktrace/elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index f4863f0..561bdc2 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -766,6 +766,7 @@ static int elf_is_symlink (const char *filename) { struct stat st; + st.st_mode = 0; if (lstat (filename, &st) < 0) return 0;