[Bug c++/89858] crash with libmpfr.so.6

2019-03-29 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

--- Comment #10 from Hans Buchmann  ---
Thank you.

Hans Buchmann

[Bug c++/89858] crash with libmpfr.so.6

2019-03-29 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

--- Comment #8 from Hans Buchmann  ---
Created attachment 46054
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46054&action=edit
/proc/cpuinfo

Sincerely 

Hans Buchmann

[Bug c++/89858] crash with libmpfr.so.6

2019-03-28 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

--- Comment #6 from Hans Buchmann  ---
Created attachment 46048
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46048&action=edit
Disassemly

[Bug c++/89858] crash with libmpfr.so.6

2019-03-28 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

--- Comment #4 from Hans Buchmann  ---
Created attachment 46045
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46045&action=edit
The gbd output

With the help of our sysadmin Peter Schlachter we managed the following output,
hopefully helpful for you.


Sincerely

Hans Buchmann

[Bug c++/89858] crash with libmpfr.so.6

2019-03-27 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

--- Comment #2 from Hans Buchmann  ---
Source from: 
 MPFR Version 4.0.1 from https://www.mpfr.org

made with:

TC=where to install
${MPFR_SRC}/configure \
 --prefix=${TC} \
 --with-gmp=${TC}
# 
${MAKE} 
${MAKE} install


A fake link:

 libmpfr.so.6 -> /usr/lib64/libmpfr.so.4.1.1

to the original works perfectly

Sincerely

Hans Buchmann

[Bug c++/89858] New: crash with libmpfr.so.6

2019-03-27 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89858

Bug ID: 89858
   Summary: crash with libmpfr.so.6
   Product: gcc
   Version: 8.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hans.buchmann at fhnw dot ch
  Target Milestone: ---

Compiling the code:

--
static const unsigned LEN=2;
unsigned data[LEN];
void start()
{
 for(unsigned i=0;ihttps://gcc.gnu.org/bugs/> for instructions.
--

../tc/bin/nios2-linux-gnu-g++ -v

--
Using built-in specs.
COLLECT_GCC=../tc/bin/nios2-linux-gnu-g++
COLLECT_LTO_WRAPPER=/home/adm/hans.buchmann/qsc/arch/nios2/tc/bin/../libexec/gcc/nios2-linux-gnu/8.3.0/lto-wrapper
Target: nios2-linux-gnu
Configured with: /home/buchmann/resources/gcc-8.3.0/configure
--prefix=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc 
--with-gmp=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc 
--with-mpfr=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc 
--with-mpc-include=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc/include
 
--with-mpc-lib=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc/lib 
--target=nios2-linux-gnu 
--disable-nls 
--disable-werror 
--enable-languages=c,c++ 
--disable-threads 
--disable-nls 
--disable-__cxa_atexit 
--with-as=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc/nios2-linux-gnu/bin//as
 
--with-ld=/home/buchmann/devel/superfluous/eo3s/nios2/tc-build/../tc/nios2-linux-gnu/bin//ld
 
--with-newlib 
--with-sysroot 
--without-headers 
--disable-libssp 
--enable-lto 
--disable-shared
Thread model: single
gcc version 8.3.0 (GCC) 


Some remarks:
 - the -O2 seems to be relevant
 - Surprisingly the crash occurs only with libmpfr.so.6
 - uname -a
Linux v90 3.10.0-514.el7.x86_64 #1 SMP 
Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

Sincerely 

Hans Buchmann

[Bug c++/86917] New: ICE in verify_ctor_sanity, at cp/constexpr.c:2798

2018-08-11 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86917

Bug ID: 86917
   Summary: ICE  in verify_ctor_sanity, at cp/constexpr.c:2798
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hans.buchmann at fhnw dot ch
  Target Milestone: ---

Created attachment 44526
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44526&action=edit
The Bug

Compiling the (wrong) code

--8<--8<--8<--8<--8<--8<--8<--
struct Byte
{
 constexpr Byte():c(0){}
 static const Byte Zero;
 unsigned c; 
};

struct Word
{
 typedef Byte W[4];
 constexpr Word():w({Byte::Zero,Byte::Zero,Byte::Zero,Byte::Zero}){}
 W w; 
};

struct AES256
{
 AES256();
 Word w[60];
};

AES256::AES256()
{
} 
--8<--8<--8<--8<--8<--8<--8<--

with 


g++  -c -o bug.o bug.cc

results in:
--8<--8<--8<--8<--8<--8<--8<--
bug.cc: In constructor \u2018AES256::AES256()\u2019:
bug.cc:21:16:   in \u2018constexpr\u2019 expansion of \u2018Word()\u2019
bug.cc:21:16: internal compiler error: in verify_ctor_sanity, at
cp/constexpr.c:2798
 AES256::AES256()
^
Please submit a full bug report,
with preprocessed source if appropriate.
--8<--8<--8<--8<--8<--8<--8<--

g++ -v

--8<--8<--8<--8<--8<--8<--8<--
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib \
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
--enable-shared --enable-threads=posix --enable-libmpx \
--with-system-zlib --with-isl --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch \
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id \
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu\
 --enable-gnu-indirect-function --enable-multilib --disable-werror \
 --enable-checking=release --enable-default-pie --enable-default-ssp
--enable-cet=auto
Thread model: posix
gcc version 8.2.0 (GCC)
--8<--8<--8<--8<--8<--8<--8<--

Sincerely

Hans Buchmann

[Bug c/86217] New: option aux-info

2018-06-19 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86217

Bug ID: 86217
   Summary: option aux-info
   Product: gcc
   Version: 8.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hans.buchmann at fhnw dot ch
  Target Milestone: ---

Created attachment 44297
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44297&action=edit
The output file

Compiling the code


static inline int arch_within_stack_frames(const void * const stack,
   const void * const stackend,
   const void *obj, unsigned long len)
{
return 0;
}
static int arch_within_stack_frames(const void * const stack,
   const void * const stackend,
   const void *obj, unsigned long len);
---
with 

gcc -aux-info aux-info.data \
-c \
-oaux-info.o \
aux-info.c

yields for aux-info.data:
---
/* compiled from: . */
/* aux-info.c:2:NF */ 
static int arch_within_stack_frames (const void *const const stack, const void
*const const stackend, const void *obj, long unsigned int len); 
//  !!twice
const
/* (stack, stackend, obj, len) const void *const const stack; const void *const
const stackend; const void *obj; long unsigned int len; */

/* aux-info.c:10:NC */ 
static int arch_within_stack_frames (const void *const , const void *const ,
const void *, long unsigned int);

it seems that the keyword 'inline' doubles the keyword const.

gcc -v:
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 8.1.1 20180531 (GCC)

Sincerely

Hans Buchmann

[Bug target/71419] interrupt attribute silently dropped for Thumb code on armv7-a

2016-06-07 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71419

--- Comment #2 from Hans Buchmann  ---
The code is produced in arm mode:

.file   "irq.cc"
.text
.align  2
.global _Z5_irq_v
.syntax unified
.arm <--- here
.fpu softvfp
.type   _Z5_irq_v, %function
_Z5_irq_v:
.fnstart
.LFB0:
@ Interrupt Service Routine.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
sub lr, lr, #4
push{r0, r1, r2, r3, ip, lr}
.save {r0, r1, r2, r3, ip, lr}
bl  _Z8externalv
pop {r0, r1, r2, r3, ip, pc}^
.fnend
.size   _Z5_irq_v, .-_Z5_irq_v
.ident  "GCC: (GNU) 6.1.0"

compiling with -mthumb yields the correct error:

../src/irq.cc: In function 'void _irq_()':
../src/irq.cc:11:1: error: interrupt Service Routines cannot be coded in Thumb
mode
 }

[Bug c++/71419] New: cortex-a9 IRQ

2016-06-05 Thread hans.buchmann at fhnw dot ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71419

Bug ID: 71419
   Summary: cortex-a9 IRQ
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hans.buchmann at fhnw dot ch
  Target Milestone: ---

Compiling the code:

extern void external();
 __attribute__ ((interrupt("IRQ"))) void _irq_() ;
 void _irq_()
 {
  external();
 }

with gcc 6.1.0 results in:

Disassembly of section .text:

 <_Z5_irq_v>:
   0:   e24ee004sub lr, lr, #4
   4:   e92d500fpush{r0, r1, r2, r3, ip, lr}
   8:   ebfebl  0 <_Z8externalv>
   c:   e8bd900fpop {r0, r1, r2, r3, ip, pc} < here

The instruction:

 e8bd900f   pop {r0, r1, r2, r3, ip, pc} 

compared to: 

 e8fd900f   ldm sp!, {r0, r1, r2, r3, ip, pc}^

dont copy the SPSR back into the CPSR

The call:

${TC}/bin/arm-none-eabi-g++ -O2 -mcpu=cortex-a9 \
-c -o irq.o ../src/irq.cc

The Compiler g++ -v

Using built-in specs.
COLLECT_GCC=../tc/bin/arm-none-eabi-g++
COLLECT_LTO_WRAPPER=/home/buchmann/devel/gcc/target/arm/libexec/gcc/arm-none-eabi/6.1.0/lto-wrapper
Target: arm-none-eabi
Configured with: /home/buchmann/devel/gcc/dist/gcc-6.1/configure -v
--prefix=/home/buchmann/devel/gcc/target/arm --target=arm-none-eabi
--enable-languages=c,c++ --disable-threads --disable-nls --disable-__cxa_atexit
--with-as=/home/buchmann/devel/gcc/target/arm/arm-none-eabi/bin/as
--with-ld=/home/buchmann/devel/gcc/target/arm/arm-none-eabi/bin/ld
--with-newlib --with-sysroot --without-headers --disable-libssp --enable-lto
--disable-shared --enable-multilib
Thread model: single
gcc version 6.1.0 (GCC) 

Kind regards 

Hans Buchmann