[Bug ada/65696] ASAN reports global-buffer-overrun for local tagged types

2019-08-19 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65696

--- Comment #3 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Aug 19 08:36:39 2019
New Revision: 274654

URL: https://gcc.gnu.org/viewcvs?rev=274654&root=gcc&view=rev
Log:
[Ada] Buffer reading overflow in dispatch table initialization

For tagged types not defined at library level that derive from library
level tagged types the compiler may generate code to initialize their
dispatch table of predefined primitives copying from the parent type
data stored in memory after the dispatch table of the parent; that is,
at runtime the initialization of dispatch tables overflows reading the
parent dispatch table.

This problem does not affect the execution of the program since the
target dispatch table always has enough space to store the extra data,
and after such copy the compiler generates code to complete the
initialization of the dispatch table.

The following test must compile and execute without errors.

package pkg_a is
   type Root is tagged null record;
end pkg_a;

with pkg_a;
procedure main is
   type Derived is new pkg_a.Root with null record;  -- Test
begin
   null;
end main;

Command: gnatmake -q main -fsanitize=address; ./main

2019-08-19  Javier Miranda  

gcc/ada/

PR ada/65696
* exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims):
Adding formal to specify how many predefined primitives are
inherited from the parent type.
* exp_disp.adb (Number_Of_Predefined_Prims): New subprogram.
(Make_Secondary_DT): Compute the number of predefined primitives
of all tagged types (including tagged types not defined at
library level).  Previously we unconditionally relied on the
Max_Predef_Prims constant value when building the dispatch
tables of tagged types not defined at library level (thus
consuming more memory for their dispatch tables than required).
(Make_DT): Compute the number of predefined primitives that must
be inherited from their parent type when building the dispatch
tables of tagged types not defined at library level. Previously
we unconditionally relied on the Max_Predef_Prims constant value
when building the dispatch tables of tagged types not defined at
library level (thus copying more data than required from the
parent type).

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_atag.adb
trunk/gcc/ada/exp_atag.ads
trunk/gcc/ada/exp_disp.adb

[Bug ada/91492] [10 regression] Ada documentation issue starting with r274637

2019-08-20 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91492

pmderodat at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-08-20
 Ever confirmed|0   |1

--- Comment #2 from pmderodat at gcc dot gnu.org ---
Hello, thank you for reporting this! I somehow failed to submit the
corresponding patch (the testcase is correct). I’ll fix this right now…

[Bug ada/91492] [10 regression] Ada documentation issue starting with r274637

2019-08-20 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91492

--- Comment #3 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Tue Aug 20 09:47:44 2019
New Revision: 274714

URL: https://gcc.gnu.org/viewcvs?rev=274714&root=gcc&view=rev
Log:
[Ada] Add missing dot at the end of lang.opt doc for -fdump-scos

2019-08-20  Pierre-Marie de Rodat  

gcc/ada/

PR ada/91492
* gcc-interface/lang.opt (-fdump-scos): Add missing dot at the
end of the documentation.

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/lang.opt

[Bug ada/91492] [10 regression] Ada documentation issue starting with r274637

2019-08-20 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91492

--- Comment #4 from pmderodat at gcc dot gnu.org ---
I just commited the fix. Can you double check that the test failure is fixed?

[Bug ada/91492] [10 regression] Ada documentation issue starting with r274637

2019-08-20 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91492

pmderodat at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from pmderodat at gcc dot gnu.org ---
Great, thanks! Sorry for the inconvenience…

[Bug ada/91268] [10 Regression] adaint.c:38: warning: "_REENTRANT" redefined

2019-09-17 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91268

--- Comment #2 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Tue Sep 17 07:59:43 2019
New Revision: 275774

URL: https://gcc.gnu.org/viewcvs?rev=275774&root=gcc&view=rev
Log:
[Ada] PR ada/91268 Do not redefine macros

This should fix PR ada/91268 by only defining macros if not already
done.

2019-09-17  Arnaud Charlet  

gcc/ada/

* adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.

Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/adaint.c

[Bug ada/89583] GNAT.Sockets.Bind_Socket fails with IPv4 address

2019-03-22 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89583

--- Comment #1 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Fri Mar 22 13:59:02 2019
New Revision: 269873

URL: https://gcc.gnu.org/viewcvs?rev=269873&root=gcc&view=rev
Log:
[Ada] GNAT.Sockets: fix recent regressions

The support for IPv6 that was added since last release triggered
regressions on various platforms. The size of structures passed to low
level routines was not correct anymore: it should depend on the address
family, now.

2019-03-22  Dmitriy Anisimkov  

gcc/ada/

PR ada/89583
* libgnat/g-socket.adb (Bind_Socket, Connect_Socket,
Send_Socket): Fix the computation of structure lengths passed to
low level routines.
(Is_IPv6_Address): Fix the number of expected colons.

2019-03-22  Simon Wright  

gcc/testsuite/

PR ada/89583
* gnat.dg/socket2.adb: New.

Added:
trunk/gcc/testsuite/gnat.dg/socket2.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/libgnat/g-socket.adb
trunk/gcc/testsuite/ChangeLog

[Bug lto/84213] [8 Regression] 521.wrf_r from SPEC 2017 fails to build (link) with LTO

2018-02-09 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84213

--- Comment #15 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Fri Feb  9 14:02:37 2018
New Revision: 257526

URL: https://gcc.gnu.org/viewcvs?rev=257526&root=gcc&view=rev
Log:
DWARF: no location for non-definition DECLs with non-trivial DECL_VALUE_EXPR

This patch restricts the set of cases in which we allow the generation of
location attributes for variables that are not defined in the current unit.
For such variables with complex DECL_VALUE_EXPR trees, generating a location
attribute can end up creating relocations to text symbols in the debug section
of LTO object files, which is not valid.

gcc/
PR lto/84213
* dwarf2out.c (is_trivial_indirect_ref): New function.
(dwarf2out_late_global_decl): Do not generate a location
attribute for variables that have a non-trivial DECL_VALUE_EXPR
and that are not defined in the current unit.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c

[Bug ada/79542] [7/8 regression] ICE in add_gnat_descriptive_type_attribute

2017-08-12 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542

--- Comment #8 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Sat Aug 12 09:07:12 2017
New Revision: 251066

URL: https://gcc.gnu.org/viewcvs?rev=251066&root=gcc&view=rev
Log:
[PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.

This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?

We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:

  * In modified_type_die, the "handle C typedef types" part calls
gen_type_die on the cloned type.

  * gen_type_die matches a typedef variant, and then calls gen_decl_die
on its TYPE_NAME, which will end up calling gen_typedef_die.

  * gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
finds one, so it only adds a DW_AT_abstract_origin attribute to the
DW_TAG_typedef DIE, but the cloned type itself does not get its own
DIE.

  * Back in modified_type_die, the call to lookup_type_die on the type
passed to gen_type_die returns NULL.

In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.

This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.

gcc/
PR ada/79542
* dwarf2out.c (modified_type_die): For C typedef types that have
an ultimate origin, process the ultimate origin instead of the
input type.
(gen_typedef_die): Assert that input DECLs have no ultimate
origin.
(gen_type_die_with_usage): For typedef variants that have an
ultimate origin, just call gen_decl_die on the original DECL.
(process_scope_var): Avoid creating DIEs for local typedefs and
concrete static variables.

gcc/testsuite/

PR ada/79542
* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.

Added:
trunk/gcc/testsuite/gnat.dg/debug13.adb
trunk/gcc/testsuite/gnat.dg/debug13.ads
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog

[Bug ada/79542] [7/8 regression] ICE in add_gnat_descriptive_type_attribute

2017-09-05 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542

--- Comment #11 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Tue Sep  5 11:04:41 2017
New Revision: 251709

URL: https://gcc.gnu.org/viewcvs?rev=251709&root=gcc&view=rev
Log:
[PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining

This is a backport from trunk.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79542 reports an ICE in
dwarf2out.c for an Ada testcase built with optimization.

This crash happens during the late generation pass because
add_gnat_descriptive_type cannot find the type DIE corresponding to some
descriptive type after having tried to generate it. This is because the
DIE was generated during the early generation pass, but then pruned by
the type pruning machinery. So why was it pruned?

We are in a situation where we have cloned types (because of inlining,
IIUC) whose TYPE_NAME have non-null DECL_ABSTRACT_ORIGIN attributes. As
a consequence:

  * In modified_type_die, the "handle C typedef types" part calls
gen_type_die on the cloned type.

  * gen_type_die matches a typedef variant, and then calls gen_decl_die
on its TYPE_NAME, which will end up calling gen_typedef_die.

  * gen_typedef_die checks decl_ultimate_origin for this TYPE_DECL, and
finds one, so it only adds a DW_AT_abstract_origin attribute to the
DW_TAG_typedef DIE, but the cloned type itself does not get its own
DIE.

  * Back in modified_type_die, the call to lookup_type_die on the type
passed to gen_type_die returns NULL.

In the end, whole type trees, i.e. the ones referenced by
DECL_ABSTRACT_ORIGIN attributes, are never referenced from type pruning
"roots" and are thus pruned. The descriptive type at stake here is one
of them, hence the assertion failure.

This patch attemps to fix that with what seems to be the most sensible
thing to do in my opinion: updating the "handle C typedef types" part in
modified_type_die to check decl_ultimate_origin before calling
gen_type_die: if that function returns something not null, then we know
that gen_type_die/gen_typedef_die will not generate a DIE for the input
type, so we try to process the ultimate origin instead. It also updates
in a similar way gen_type_die_with_usage, assert that when
gen_typedef_die is called on nodes that have an ultimate origin, this
origin is themselves.

gcc/
PR ada/79542
* dwarf2out.c (modified_type_die): For C typedef types that have
an ultimate origin, process the ultimate origin instead of the
input type.
(gen_typedef_die): Assert that input DECLs have no ultimate
origin.
(gen_type_die_with_usage): For typedef variants that have an
ultimate origin, just call gen_decl_die on the original DECL.
(process_scope_var): Avoid creating DIEs for local typedefs and
concrete static variables.

gcc/testsuite/

PR ada/79542
* gnat.dg/debug13.ads, gnat.dg/debug13.adb: New testcase.


Added:
branches/gcc-7-branch/gcc/testsuite/gnat.dg/debug13.adb
branches/gcc-7-branch/gcc/testsuite/gnat.dg/debug13.ads
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/dwarf2out.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug ada/71358] GNAT.Command_Line.Getopt fails if there are no switches

2017-09-18 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71358

--- Comment #6 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Sep 18 08:43:37 2017
New Revision: 252909

URL: https://gcc.gnu.org/viewcvs?rev=252909&root=gcc&view=rev
Log:
2017-09-18  Bob Duff  

Alternate fix for PR ada/71358
* libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
Instead, make a local copy of Config, and if it's null, allocate an
empty Command_Line_Configuration_Record, so we won't crash on null
pointer dereference.


Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/libgnat/g-comlin.adb

[Bug debug/82155] [7/8 Regression] ICE in dwarf2out_abstract_function, at dwarf2out.c:21655

2017-09-25 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82155

--- Comment #5 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Sep 25 12:26:36 2017
New Revision: 253147

URL: https://gcc.gnu.org/viewcvs?rev=253147&root=gcc&view=rev
Log:
[PR82155] Fix crash in dwarf2out_abstract_function

This patch is an attempt to fix the crash reported in PR82155.

When generating a C++ class method for a class that is itself nested in
a class method, dwarf2out_early_global_decl currently leaves the
existing context DIE as it is if it already exists.  However, it is
possible that this call happens at a point where this context DIE is
just a declaration that is itself not located in its own context.

From there, if dwarf2out_early_global_decl is not called on any of the
FUNCTION_DECL in the context chain, DIEs will be left badly scoped and
some (such as the nested method) will be removed by the type pruning
machinery.  As a consequence, dwarf2out_abstract_function will will
crash when called on the corresponding DECL because it asserts that the
DECL has a DIE.

This patch fixes this crash making dwarf2out_early_global_decl process
context DIEs the same way we process abstract origins for FUNCTION_DECL:
if the corresponding DIE exists but is only a declaration, call
dwarf2out_decl anyway on it so that it is turned into a more complete
DIE and so that it is relocated in the proper context.

Bootstrapped and regtested on x86_64-linux.

gcc/

PR debug/82155
* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
on the FUNCTION_DECL function context if it has a DIE that is a
declaration.

gcc/testsuite/

* g++.dg/pr82155.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/pr82155.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog

[Bug debug/78112] [7 regression] invalid DWARF generated by the compiler: DIE has multiple AT_inline attributes

2016-12-08 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112

--- Comment #18 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Dec  8 11:01:03 2016
New Revision: 243432

URL: https://gcc.gnu.org/viewcvs?rev=243432&root=gcc&view=rev
Log:
[PR78112] Remove platform-dependent checks in g++.dg/pr78112.C

... as there checks failed on many platforms. As a replacement, this
commit also adds a new testcase from source reduction. The hope is that
this new testcase will get a consistent output across all platforms.

gcc/testsuite/
PR debug/78112
* g++.dg/pr78112.C: Remove platform-dependent checks.
* g++.dg/pr78112-2.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/pr78112-2.C
Modified:
trunk/gcc/testsuite/g++.dg/pr78112.C

[Bug debug/78112] [7 regression] invalid DWARF generated by the compiler: DIE has multiple AT_inline attributes

2016-12-08 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112

--- Comment #19 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Dec  8 11:04:11 2016
New Revision: 243433

URL: https://gcc.gnu.org/viewcvs?rev=243433&root=gcc&view=rev
Log:
Add the missing ChangeLog entry for r243432

2016-12-08  Pierre-Marie de Rodat  

PR debug/78112
* g++.dg/pr78112.C: Remove platform-dependent checks.
* g++.dg/pr78112-2.C: New testcase.

Modified:
trunk/gcc/testsuite/ChangeLog

[Bug debug/82155] [7 Regression] ICE in dwarf2out_abstract_function, at dwarf2out.c:21655

2017-11-15 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82155

--- Comment #8 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Wed Nov 15 11:54:11 2017
New Revision: 254761

URL: https://gcc.gnu.org/viewcvs?rev=254761&root=gcc&view=rev
Log:
[PATCH] [PR82155] Fix crash in dwarf2out_abstract_function

Backport from mainline (r253147):

This patch is an attempt to fix the crash reported in PR82155.

When generating a C++ class method for a class that is itself nested in
a class method, dwarf2out_early_global_decl currently leaves the
existing context DIE as it is if it already exists.  However, it is
possible that this call happens at a point where this context DIE is
just a declaration that is itself not located in its own context.

From there, if dwarf2out_early_global_decl is not called on any of the
FUNCTION_DECL in the context chain, DIEs will be left badly scoped and
some (such as the nested method) will be removed by the type pruning
machinery.  As a consequence, dwarf2out_abstract_function will will
crash when called on the corresponding DECL because it asserts that the
DECL has a DIE.

This patch fixes this crash making dwarf2out_early_global_decl process
context DIEs the same way we process abstract origins for FUNCTION_DECL:
if the corresponding DIE exists but is only a declaration, call
dwarf2out_decl anyway on it so that it is turned into a more complete
DIE and so that it is relocated in the proper context.

Bootstrapped and regtested on x86_64-linux.

gcc/

PR debug/82155
* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
on the FUNCTION_DECL function context if it has a DIE that is a
declaration.

gcc/testsuite/

* g++.dg/pr82155.C: New testcase.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/pr82155.C
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/dwarf2out.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug debug/78112] [7 regression] invalid DWARF generated by the compiler: DIE has multiple AT_inline attributes

2016-11-10 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78112

--- Comment #12 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Nov 10 11:06:32 2016
New Revision: 242035

URL: https://gcc.gnu.org/viewcvs?rev=242035&root=gcc&view=rev
Log:
debug/78112: remove recent duplicates for DW_TAG_subprogram attributes

Disable unnecessary calls to dwarf2out_decl for the parents of nested
functions. This fixes a libstdc++ build regression on
x86_64-apple-darwin, as these calls used to add duplicate attributes
(for instance DW_AT_inline and DW_AT_object_pointer) to the
corresponding DW_TAG_subprogram DIE.

Bootstrapped and regtested on x86_64-linux.

gcc/
PR debug/78112
* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
on the context only when it has no DIE yet.

testsuite/
PR debug/78112
* g++.dg/pr78112.C: New testcase

Added:
trunk/gcc/testsuite/g++.dg/pr78112.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-10-19 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790

--- Comment #44 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Oct 19 23:47:35 2015
New Revision: 229008

URL: https://gcc.gnu.org/viewcvs?rev=229008&root=gcc&view=rev
Log:
REE: fix uninitialized registers handling

gcc/ChangeLog:

PR rtl-optimization/66790
* df.h (DF_MIR): New macro.
(DF_LAST_PROBLEM_PLUS1): Update to be past DF_MIR
(DF_MIR_INFO_BB): New macro.
(DF_MIR_IN, DF_MIR_OUT): New macros.
(struct df_mir_bb_info): New.
(df_mir): New macro.
(df_mir_add_problem, df_mir_simulate_one_insn): New forward
declarations.
(df_mir_get_bb_info): New.
* df-problems.c (struct df_mir_problem_data): New.
(df_mir_free_bb_info, df_mir_alloc, df_mir_reset,
df_mir_bb_local_compute, df_mir_local_compute, df_mir_init,
df_mir_confluence_0, df_mir_confluence_n,
df_mir_transfer_function, df_mir_free, df_mir_top_dump,
df_mir_bottom_dump, df_mir_verify_solution_start,
df_mir_verify_solution_end): New.
(problem_MIR): New.
(df_mir_add_problem, df_mir_simulate_one_insn): New.
* timevar.def (TV_DF_MIR): New.
* ree.c: Include bitmap.h
(add_removable_extension): Add an INIT_REGS parameter.  Use it
to skip zero-extensions that may get an uninitialized register.
(find_removable_extensions): Compute must-initialized registers
using the MIR dataflow problem. Update the call to
add_removable_extension.
(find_and_remove_re): Call df_mir_add_problem.

gcc/testsuite/ChangeLog:

* gnat.dg/opt50.adb: New test.
* gnat.dg/opt50_pkg.adb: New helper.
* gnat.dg/opt50_pkg.ads: New helper.

Added:
trunk/gcc/testsuite/gnat.dg/opt50.adb
trunk/gcc/testsuite/gnat.dg/opt50_pkg.adb
trunk/gcc/testsuite/gnat.dg/opt50_pkg.ads
Modified:
trunk/gcc/ChangeLog
trunk/gcc/df-problems.c
trunk/gcc/df.h
trunk/gcc/ree.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/timevar.def


[Bug debug/53927] wrong value for DW_AT_static_link

2015-11-26 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927

--- Comment #24 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Nov 26 14:56:24 2015
New Revision: 230968

URL: https://gcc.gnu.org/viewcvs?rev=230968&root=gcc&view=rev
Log:
DWARF: fix loc. descr. generation for DW_AT_static_link

gcc/ChangeLog:

PR debug/53927
* tree-nested.c (finalize_nesting_tree_1): Append a field to
hold the frame base address.
* dwarf2out.c (gen_subprogram_die): Generate for
DW_AT_static_link a location description that computes the value
of this field.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/tree-nested.c

[Bug debug/53927] wrong value for DW_AT_static_link

2015-11-30 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927

pmderodat at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||pmderodat at gcc dot gnu.org
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |pmderodat at gcc dot 
gnu.org
   Target Milestone|--- |6.0

--- Comment #25 from pmderodat at gcc dot gnu.org ---
DW_AT_static_link is properly generated after revision 230968.

[Bug debug/66503] [4.9/5/6 Regression] missing DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66503

--- Comment #2 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Jun 11 12:40:10 2015
New Revision: 224371

URL: https://gcc.gnu.org/viewcvs?rev=224371&root=gcc&view=rev
Log:
Restore DW_AT_abstract_origin for cross-unit call sites

PR debug/66503

gcc/ChangeLog:
* debug.h (struct gcc_debug_hooks): Add a
register_main_translation_unit hook.
* debug.c (do_nothing_debug_hooks): Provide a function for this
new hook.
* dbxout.c (dbx_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (main_translation_unit): New global variable.
(dwarf2out_register_main_translation_unit): New function
implementing the new hook.
(dwarf2_debug_hooks): Assign
dwarf2out_register_main_translation_unit to this new hook.
(dwarf2out_init): Associate any main translation unit to
comp_unit_die ().
* c/c-decl.c (pop_scope): Register the main translation unit
through the new debug hook.
* cp/decl.c (cxx_init_decl_processing): Likewise.

gcc/ada/ChangeLog:
* gcc-interface/utils.c (get_global_context): Register the main
translation unit through the new debug hook.

gcc/fortran/ChangeLog:
* f95-lang.c (gfc_create_decls): Register the main translation
unit through the new debug hook.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/gcc-interface/utils.c
trunk/gcc/c/c-decl.c
trunk/gcc/cp/decl.c
trunk/gcc/dbxout.c
trunk/gcc/debug.c
trunk/gcc/debug.h
trunk/gcc/dwarf2out.c
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/sdbout.c
trunk/gcc/vmsdbgout.c


[Bug debug/66503] [4.9/5/6 Regression] missing DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread pmderodat at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66503

--- Comment #4 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Thu Jun 11 12:51:04 2015
New Revision: 224373

URL: https://gcc.gnu.org/viewcvs?rev=224373&root=gcc&view=rev
Log:
Restore DW_AT_abstract_origin for cross-unit call sites

PR debug/66503
Backport from mainline

gcc/ChangeLog:
* debug.h (struct gcc_debug_hooks): Add a
register_main_translation_unit hook.
* debug.c (do_nothing_debug_hooks): Provide a function for this
new hook.
* dbxout.c (dbx_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* dwarf2out.c (main_translation_unit): New global variable.
(dwarf2out_register_main_translation_unit): New function
implementing the new hook.
(dwarf2_debug_hooks): Assign
dwarf2out_register_main_translation_unit to this new hook.
(dwarf2out_init): Associate any main translation unit to
comp_unit_die ().
* c/c-decl.c (pop_scope): Register the main translation unit
through the new debug hook.
* cp/decl.c (cxx_init_decl_processing): Likewise.

gcc/ada/ChangeLog:
* gcc-interface/utils.c (get_global_context): Register the main
translation unit through the new debug hook.

gcc/fortran/ChangeLog:
* f95-lang.c (gfc_create_decls): Register the main translation
unit through the new debug hook.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ada/ChangeLog
branches/gcc-5-branch/gcc/ada/gcc-interface/utils.c
branches/gcc-5-branch/gcc/c/c-decl.c
branches/gcc-5-branch/gcc/cp/decl.c
branches/gcc-5-branch/gcc/dbxout.c
branches/gcc-5-branch/gcc/debug.c
branches/gcc-5-branch/gcc/debug.h
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/f95-lang.c
branches/gcc-5-branch/gcc/sdbout.c
branches/gcc-5-branch/gcc/vmsdbgout.c


[Bug ada/98312] [11 Regression] Broken Ada bootstrap

2020-12-16 Thread pmderodat at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98312

pmderodat at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |pmderodat at gcc dot 
gnu.org
 CC||pmderodat at gcc dot gnu.org

--- Comment #2 from pmderodat at gcc dot gnu.org ---
Hello Martin,

Thank you for reporting this and sorry for the inconvenience! As discussed on
gcc-patches@, I suspect that my testing hasn’t detected this because of some
inconsistency with my incremental builds.

This should be fixed now that
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=cbe22e189a355f19eb1344fcaf91bc2bb0b95f36
is pushed.

[Bug ada/98312] [11 Regression] Broken Ada bootstrap

2020-12-16 Thread pmderodat at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98312

--- Comment #4 from pmderodat at gcc dot gnu.org ---
That’s a relief, thank you for the confirmation :)