RE: Re: DWARF output different between GCC 5 and 6

2016-12-16 Thread Tom O'Connor
Opened as bug 78839 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78839 From: Jakub Jelinek [ja...@redhat.com] Sent: Friday, December 16, 2016 6:03 PM To: Tom O'Connor Cc: gcc@gcc.gnu.org Subject: EXTERNAL: Re: DWARF output different between GCC 5 and 6 On F

Re: DWARF output different between GCC 5 and 6

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 10:30:09PM +, Tom O'Connor wrote: > I've observed a difference in DWARF output for the same input source code > between GCC 5 and GCC 6, specifically in the DW_AT_data_member_location > values for bitfield members of structs. For example, This changed with http://gcc.g

DWARF output different between GCC 5 and 6

2016-12-16 Thread Tom O'Connor
Hello, I've observed a difference in DWARF output for the same input source code between GCC 5 and GCC 6, specifically in the DW_AT_data_member_location values for bitfield members of structs. For example, s.c: struct s { unsigned int shutdown:2, no_check_tx:1, no_check_rx:1, user

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Pedro Alves
On 12/16/2016 06:56 PM, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 06:52:03PM +, Pedro Alves wrote: >> GDB has a string_printf function that prints into a std::string, for >> example. Like: >> >> std::string hello = string_printf ("%s", "hello world"); >> >> That's a function that many C

Re: Do we really need a CPP manual?

2016-12-16 Thread Jim Wilson
On 12/16/2016 10:06 AM, Jeff Law wrote: That's likely the manual RMS kept asking folks (semi-privately) to review. My response was consistently that such review should happen publicly, which RMS opposed for reasons I don't recall. I reviewed it, on the grounds that a happy rms is good for the

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 06:52:03PM +, Pedro Alves wrote: > GDB has a string_printf function that prints into a std::string, for > example. Like: > > std::string hello = string_printf ("%s", "hello world"); > > That's a function that many C++ projects reinvent. If you then want to work wit

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Pedro Alves
On 12/16/2016 06:04 PM, Jakub Jelinek wrote: > On Fri, Dec 16, 2016 at 06:55:12PM +0100, Janus Weil wrote: >> To get to more specific questions ... >> >>> Basically the only STL construct used in the Fortran FE right now >>> seems to be std::swap, and a single instance of std::map in >>> trans-comm

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Pedro Alves
On 12/16/2016 06:31 PM, Janus Weil wrote: > 2016-12-16 18:53 GMT+01:00 Pedro Alves : >> On 12/16/2016 05:33 PM, Janus Weil wrote: >>> And in particular: How do the current uses of >>> std::string in GCC deal with this problem? (Do they?) >> >> Doesn't look like they do. > > Huh, that's a problem

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Janus Weil
2016-12-16 18:53 GMT+01:00 Pedro Alves : > On 12/16/2016 05:33 PM, Janus Weil wrote: > >> "You would need to make sure it uses a xmalloc based allocator first >> or at least calls xmalloc_failed upon allocation failure, otherwise it >> will be a serious regression." >> >> I'm really not an expert o

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread N.M. Maclaren
On Dec 16 2016, Janus Weil wrote: thanks for this lengthy comment, but that's really not the kind of discussion I wanna get into here. (And I don't actually agree to all of your points, but that doesn't matter.) Sorry - I misunderstood. Regards, Nick Maclaren.

Re: Do we really need a CPP manual?

2016-12-16 Thread Jeff Law
On 12/16/2016 11:01 AM, Sandra Loosemore wrote: On 12/16/2016 08:45 AM, Joseph Myers wrote: On Thu, 15 Dec 2016, Sandra Loosemore wrote: Looking at the structure of the whole manual, though, I see that most of it is in fact a tutorial on how to use the preprocessor language, like you would fin

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 06:55:12PM +0100, Janus Weil wrote: > To get to more specific questions ... > > > Basically the only STL construct used in the Fortran FE right now > > seems to be std::swap, and a single instance of std::map in > > trans-common.c. > > I see that fortran/trans-common.c has

Re: Do we really need a CPP manual?

2016-12-16 Thread Sandra Loosemore
On 12/16/2016 08:45 AM, Joseph Myers wrote: On Thu, 15 Dec 2016, Sandra Loosemore wrote: Looking at the structure of the whole manual, though, I see that most of it is in fact a tutorial on how to use the preprocessor language, like you would find in a C programming book. Is this a useful thin

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Janus Weil
To get to more specific questions ... > Basically the only STL construct used in the Fortran FE right now > seems to be std::swap, and a single instance of std::map in > trans-common.c. I see that fortran/trans-common.c has: #define INCLUDE_MAP and apparently there is also a INCLUDE_STRING macr

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Pedro Alves
On 12/16/2016 05:33 PM, Janus Weil wrote: > "You would need to make sure it uses a xmalloc based allocator first > or at least calls xmalloc_failed upon allocation failure, otherwise it > will be a serious regression." > > I'm really not an expert on GCC's memory management principles and how > i

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Janus Weil
Hi Nick, 2016-12-16 18:16 GMT+01:00 N.M. Maclaren : > On Dec 16 2016, Janus Weil wrote: >> >> What I'd like to know is: In the current state of things in GCC, is it >> possible/reasonable to use any of the STL containers (like >> std::vector, std::string, whatever) in GCC and its front ends (in >>

Re: using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread N.M. Maclaren
On Dec 16 2016, Janus Weil wrote: What I'd like to know is: In the current state of things in GCC, is it possible/reasonable to use any of the STL containers (like std::vector, std::string, whatever) in GCC and its front ends (in particular gfortran)? That question has two parts: 1) Is it techn

Debian/Ubuntu test rebuilds using GCC 7 (r243559)

2016-12-16 Thread Matthias Klose
Here are the results of a first test rebuild of the Debian (amd64) and Ubuntu (all architectures) archives. The test was started with a GCC trunk around 20161202, and then build failures were retried later with r243559. I filed around 10-15 issues for ICEs, the most of them already fixed on the tr

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Martin Jambor
Hi, On Fri, Dec 16, 2016 at 02:31:48PM +0100, Jakub Jelinek wrote: > Suggestions how to test that IPA-SRA and IPA-PTA aren't happening? > Anything else we need to cover? > I would use some test from gcc/testsuite/gcc.dg/ipa/ipa-sra-*.c, add the attribute and negate the scan-dump test. Martin

Re: Do we really need a CPP manual?

2016-12-16 Thread Joseph Myers
On Thu, 15 Dec 2016, Sandra Loosemore wrote: > Looking at the structure of the whole manual, though, I see that most of > it is in fact a tutorial on how to use the preprocessor language, like > you would find in a C programming book. Is this a useful thing for us > to be providing? Offhand I

using C++ STL containers in GCC/gfortran source code

2016-12-16 Thread Janus Weil
Hi all, I recently ran into some discussion with Jakub about using std::string in gfortran (see PR 78822), which got me curious about some general points ... What I'd like to know is: In the current state of things in GCC, is it possible/reasonable to use any of the STL containers (like std::vect

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 10:47:34AM +0100, Richard Biener wrote: > On Thu, 15 Dec 2016, Florian Weimer wrote: > > > * Jakub Jelinek: > > > > > + if (lookup_attribute ("used", attributes) == NULL) > > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > > > Attribute “

Re: Do we really need a CPP manual?

2016-12-16 Thread David Brown
On 16/12/16 11:55, Jonathan Wakely wrote: > On 16 December 2016 at 06:46, Sandra Loosemore wrote: >> Looking at the structure of the whole manual, though, I see that most of it >> is in fact a tutorial on how to use the preprocessor language, like you >> would find in a C programming book. Is this

Re: Do we really need a CPP manual?

2016-12-16 Thread Jonathan Wakely
On 16 December 2016 at 06:46, Sandra Loosemore wrote: > Looking at the structure of the whole manual, though, I see that most of it > is in fact a tutorial on how to use the preprocessor language, like you > would find in a C programming book. Is this a useful thing for us to be > providing? Offh

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Richard Biener
On Thu, 15 Dec 2016, Florian Weimer wrote: > * Jakub Jelinek: > > > + if (lookup_attribute ("used", attributes) == NULL) > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > Attribute “used” seems different to me from the rest. Based on the > documentation, I wo

Re: Do we really need a CPP manual?

2016-12-16 Thread Janne Blomqvist
On Fri, Dec 16, 2016 at 8:46 AM, Sandra Loosemore wrote: > On a related topic do we really need to retain implementations of > -traditional-cpp and the documented "obsolete features" (assertions)? It > seems especially weird to retain support for -traditional-cpp given that > support for pre-