const volatile behaviour change in GCC 7

2016-09-22 Thread Sebastian Huber
Hello, for RTEMS we use linker sets to initialize the system. The following code worked up to GCC 6, but no longer in GCC 7: typedef void ( *rtems_sysinit_handler )( void ); typedef struct { rtems_sysinit_handler handler; } rtems_sysinit_item; rtems_sysinit_item volatile const _Linker_set_

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Andrew Pinski
On Thu, Sep 22, 2016 at 3:23 PM, Sebastian Huber wrote: > Hello, > > for RTEMS we use linker sets to initialize the system. The following code > worked up to GCC 6, but no longer in GCC 7: > > typedef void ( *rtems_sysinit_handler )( void ); > > typedef struct { > rtems_sysinit_handler handler;

gcc 3.4.6 asm charset error

2016-09-22 Thread Paul Edwards
GCC 3.4.6 natively handles different character sets for source and target. It actually works fine, writing source code in ASCII targeting an EBCDIC destination. However, __asm() doesn't seem to be working. As seen below, it is generating EBCDIC data in the ASCII assembler output. Those funny char

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Andreas Schwab
On Sep 22 2016, Sebastian Huber wrote: > for RTEMS we use linker sets to initialize the system. The following code > worked up to GCC 6, but no longer in GCC 7: > > typedef void ( *rtems_sysinit_handler )( void ); > > typedef struct { > rtems_sysinit_handler handler; > } rtems_sysinit_item; > >

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Richard Biener
On Thu, Sep 22, 2016 at 9:58 AM, Andreas Schwab wrote: > On Sep 22 2016, Sebastian Huber wrote: > >> for RTEMS we use linker sets to initialize the system. The following code >> worked up to GCC 6, but no longer in GCC 7: >> >> typedef void ( *rtems_sysinit_handler )( void ); >> >> typedef struct

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread David Brown
On 22/09/16 09:23, Sebastian Huber wrote: > Hello, > > for RTEMS we use linker sets to initialize the system. The following > code worked up to GCC 6, but no longer in GCC 7: > > typedef void ( *rtems_sysinit_handler )( void ); > > typedef struct { > rtems_sysinit_handler handler; > } rtems_sy

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Sergey Organov
Sebastian Huber writes: > Hello, > > for RTEMS we use linker sets to initialize the system. The following > code worked up to GCC 6, but no longer in GCC 7: > > typedef void ( *rtems_sysinit_handler )( void ); > > typedef struct { > rtems_sysinit_handler handler; > } rtems_sysinit_item; > > rte

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Sebastian Huber
On 22/09/16 14:11, Sergey Organov wrote: Sebastian Huber writes: Hello, for RTEMS we use linker sets to initialize the system. The following code worked up to GCC 6, but no longer in GCC 7: typedef void ( *rtems_sysinit_handler )( void ); typedef struct { rtems_sysinit_handler handler;

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Paul.Koning
> On Sep 22, 2016, at 6:17 AM, David Brown wrote: > > ... > Your trouble is that your two pointers, cur and end, are pointing at > different variables. Comparing two pointers that are independent (i.e., > not pointing to parts of the same aggregate object) is undefined - the > compiler can assu

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread David Brown
On 22/09/16 16:57, paul.kon...@dell.com wrote: > >> On Sep 22, 2016, at 6:17 AM, David Brown wrote: >> >> ... >> Your trouble is that your two pointers, cur and end, are pointing at >> different variables. Comparing two pointers that are independent (i.e., >> not pointing to parts of the same ag

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Paul.Koning
> On Sep 22, 2016, at 11:16 AM, David Brown wrote: > > On 22/09/16 16:57, paul.kon...@dell.com wrote: >> >>> On Sep 22, 2016, at 6:17 AM, David Brown wrote: >>> >>> ... >>> Your trouble is that your two pointers, cur and end, are pointing at >>> different variables. Comparing two pointers th

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Richard Biener
On September 22, 2016 5:20:56 PM GMT+02:00, paul.kon...@dell.com wrote: > >> On Sep 22, 2016, at 11:16 AM, David Brown >wrote: >> >> On 22/09/16 16:57, paul.kon...@dell.com wrote: >>> On Sep 22, 2016, at 6:17 AM, David Brown >wrote: ... Your trouble is that your two pointer

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Richard Earnshaw (lists)
On 22/09/16 16:20, paul.kon...@dell.com wrote: > >> On Sep 22, 2016, at 11:16 AM, David Brown wrote: >> >> On 22/09/16 16:57, paul.kon...@dell.com wrote: >>> On Sep 22, 2016, at 6:17 AM, David Brown wrote: ... Your trouble is that your two pointers, cur and end, are pointing

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Paul.Koning
> On Sep 22, 2016, at 11:31 AM, Richard Earnshaw (lists) > wrote: > >>> ... >>> void rtems_initialize_executive(void) >>> { >>> uintptr_t cur = (uintptr_t) _Linker_set__Sysinit_begin; >>> uintptr_t end = (uintptr_t) _Linker_set__Sysinit_end; >> >> I would not expect the compiler to apply point

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread Sergey Organov
Sebastian Huber writes: > On 22/09/16 14:11, Sergey Organov wrote: >> Sebastian Huber writes: >>> Hello, [...] >> Alternatively, try (untested, and I removed attributes to make my point >> clearer): >> >> /* Linker-defined symbols */ >> >> rtems_sysinit_item const _Linker_set__Sysinit_begin[0]

Re: const volatile behaviour change in GCC 7

2016-09-22 Thread David Brown
On 22/09/16 17:30, Richard Biener wrote: On September 22, 2016 5:20:56 PM GMT+02:00, paul.kon...@dell.com wrote: On Sep 22, 2016, at 11:16 AM, David Brown wrote: On 22/09/16 16:57, paul.kon...@dell.com wrote: On Sep 22, 2016, at 6:17 AM, David Brown wrote: ... Your trouble is that y

Re: gcc 3.4.6 asm charset error

2016-09-22 Thread Segher Boessenkool
On Thu, Sep 22, 2016 at 05:35:22PM +1000, Paul Edwards wrote: > GCC 3.4.6 natively handles different character > sets for source and target. It actually works > fine, writing source code in ASCII targeting > an EBCDIC destination. > > However, __asm() doesn't seem to be working. > As seen below, i

gcc-6-20160922 is now available

2016-09-22 Thread gccadmin
Snapshot gcc-6-20160922 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/6-20160922/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 6 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/branches/gcc-6

Re: gcc 3.4.6 asm charset error

2016-09-22 Thread Paul Edwards
GCC 3.4.6 is the last version of GCC that supports the i370 target that I use. Last time I tried adding the i370 target from GCC 3.4.6 to GCC 4.x I got errors that I don't know how to fix. Actually GCC 3.4.6 also has errors which I don't know how to fix, so I normally use GCC 3.2.3. I hope one