[Bug lto/55113] internal compiler error: in emit_library_call_value_1, at calls.c:3739

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



--- Comment #3 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 02:33:28 UTC ---

My apologies -- I haven't been receiving notification emails from bugzilla for

some reason so I didn't see your comments.



I'll attach the preprocessed source in a few minutes.



The object files were compiled with -Os


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



--- Comment #4 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 02:58:22 UTC ---

Compiling with -O0 changes the ICE to:



internal compiler error: in emit_move_insn, at expr.c:3435


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



--- Comment #5 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 03:04:27 UTC ---

Please ignore my last comment. It was meant for bug 55113.


[Bug lto/55113] internal compiler error: in emit_library_call_value_1, at calls.c:3739

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



--- Comment #4 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 03:05:26 UTC ---

Compiling with -O0 changes the ICE to:



internal compiler error: in emit_move_insn, at expr.c:3435


[Bug lto/55113] internal compiler error: in emit_library_call_value_1, at calls.c:3739

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



--- Comment #5 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 03:11:33 UTC ---

Created attachment 28747

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28747

Preprocessed source


[Bug lto/55113] internal compiler error: in emit_library_call_value_1, at calls.c:3739

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



--- Comment #6 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 03:12:20 UTC ---

Preprocessed source added.



Compile with:



powerpc-eabispe-gcc -fno-builtin -fshort-double -Os -flto=jobserver -std=gnu99

-nostdlib -fuse-linker-plugin -o test etpu_port_E.c tpu_E.c



to reproduce the bug.



Thanks, and sorry again for the delay.


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



--- Comment #6 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 05:44:50 UTC ---

Created attachment 28750

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28750

Test case


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-11-20 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



--- Comment #7 from Patrick Oppenlander patrick at motec dot com.au 
2012-11-21 05:45:51 UTC ---

Test code added.



Compile with



powerpc-eabispe-gcc -fshort-double -flto=jobserver -nostdlib -o test eqadc_E.c



to reproduce the bug.



Looks like it is related to -f-short-double.



Thanks,



Patrick


[Bug lto/55112] New: internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-10-28 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



 Bug #: 55112

   Summary: internal compiler error: in simplify_subreg, at

simplify-rtx.c:5424

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: lto

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: patr...@motec.com.au





Using cross compile gcc (x86_64-powerpc-eabispe) the following command line

results in an internal compiler error.



I've attached the problem object file.



Hope this is enough information, thanks.



patrick@gtr:~/bug/report1$ powerpc-eabispe-gcc -v -Os -flto=jobserver -nostdlib

-o test bug.o

Using built-in specs.

COLLECT_GCC=powerpc-eabispe-gcc

COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/lto-wrapper

Target: powerpc-eabispe

Configured with: /z/src/e7/toolchain/src/gcc-4.7.2/configure

--prefix=/z/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu

--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe

--enable-languages=c,c++ --with-sysroot=/z/src/e7/toolchain/../prex_sysroot

--disable-nls --disable-werror --with-newlib

--with-gmp=/z/src/e7/toolchain/stage2 --with-mpfr=/z/src/e7/toolchain/stage2

--disable-shared --disable-debug --disable-libssp --with-cpu=8540

Thread model: single

gcc version 4.7.2 (GCC) 

COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/:/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/bin/

LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/lib/

COLLECT_GCC_OPTIONS='-v' '-Os' '-flto=jobserver' '-nostdlib' '-o' 'test'

'-mcpu=8540'



/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/collect2

-plugin

/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/liblto_plugin.so

-plugin-opt=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/lto-wrapper

-plugin-opt=-fresolution=/tmp/ccTv6kV7.res -flto=jobserver

--sysroot=/z/src/e7/toolchain/../prex_sysroot --eh-frame-hdr -V -dn -Bstatic -o

test

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/lib

bug.o

GNU ld (GNU Binutils) 2.22

  Supported emulations:

   elf32ppc

   elf32ppclinux

   elf32ppcsim powerpc-eabispe-gcc @/tmp/ccu1YKNX.args

Using built-in specs.

COLLECT_GCC=powerpc-eabispe-gcc

Target: powerpc-eabispe

Configured with: /z/src/e7/toolchain/src/gcc-4.7.2/configure

--prefix=/z/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu

--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe

--enable-languages=c,c++ --with-sysroot=/z/src/e7/toolchain/../prex_sysroot

--disable-nls --disable-werror --with-newlib

--with-gmp=/z/src/e7/toolchain/stage2 --with-mpfr=/z/src/e7/toolchain/stage2

--disable-shared --disable-debug --disable-libssp --with-cpu=8540

Thread model: single

gcc version 4.7.2 (GCC) 

COLLECT_GCC_OPTIONS='-c' '-msdata=none' '-mno-spe' '-mcpu=8540' '-v' '-Os'

'-nostdlib' '-mcpu=8540' '-dumpdir' './' '-dumpbase' 'test.wpa'

'-fltrans-output-list=/tmp/cc4GjAt6.ltrans.out' '-fwpa'

'-fresolution=/tmp/ccTv6kV7.res'



/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/../../libexec/gcc/powerpc-eabispe/4.7.2/lto1

-quiet -dumpdir ./ -dumpbase test.wpa -msdata=none -mno-spe -mcpu=8540

-mcpu=8540 -auxbase bug -Os -version

-fltrans-output-list=/tmp/cc4GjAt6.ltrans.out -fwpa

-fresolution=/tmp/ccTv6kV7.res @/tmp/ccfQPfB6

GNU GIMPLE (GCC) version 4.7.2 (powerpc-eabispe)

compiled by GNU C version 4.7.2, GMP version 5.0.1, MPFR version 3.1.1, MPC

version 0.9

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

GNU GIMPLE (GCC) version 4.7.2 (powerpc-eabispe)

compiled by GNU C version 4.7.2, GMP version 5.0.1, MPFR version 3.1.1, MPC

version 0.9

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2012-10-28 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



--- Comment #1 from Patrick Oppenlander patrick at motec dot com.au 
2012-10-28 22:18:32 UTC ---

Created attachment 28549

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28549

Problem object file


[Bug lto/55113] New: internal compiler error: in emit_library_call_value_1, at calls.c:3739

2012-10-28 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



 Bug #: 55113

   Summary: internal compiler error: in emit_library_call_value_1,

at calls.c:3739

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: lto

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: patr...@motec.com.au





Created attachment 28550

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28550

Problem object files



Using cross-compile gcc (x86_64 to powerpc) the following command line results

in an internal compiler error.



I have attached the problem object files (couldn't reduce beyond these two).



Hope this is enough information, thanks.



patrick@gtr:~/bug/report2$ powerpc-eabispe-gcc -v -Os -flto=jobserver -nostdlib

-o test *.o

Using built-in specs.

COLLECT_GCC=powerpc-eabispe-gcc

COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/lto-wrapper

Target: powerpc-eabispe

Configured with: /z/src/e7/toolchain/src/gcc-4.7.2/configure

--prefix=/z/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu

--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe

--enable-languages=c,c++ --with-sysroot=/z/src/e7/toolchain/../prex_sysroot

--disable-nls --disable-werror --with-newlib

--with-gmp=/z/src/e7/toolchain/stage2 --with-mpfr=/z/src/e7/toolchain/stage2

--disable-shared --disable-debug --disable-libssp --with-cpu=8540

Thread model: single

gcc version 4.7.2 (GCC) 

COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/:/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/bin/

LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/:/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/lib/

COLLECT_GCC_OPTIONS='-v' '-Os' '-flto=jobserver' '-nostdlib' '-o' 'test'

'-mcpu=8540'



/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/collect2

-plugin

/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/liblto_plugin.so

-plugin-opt=/home/patrick/src/e7/toolchain/stage2/bin/../libexec/gcc/powerpc-eabispe/4.7.2/lto-wrapper

-plugin-opt=-fresolution=/tmp/ccXmIQW9.res -flto=jobserver

--sysroot=/z/src/e7/toolchain/../prex_sysroot --eh-frame-hdr -V -dn -Bstatic -o

test

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc

-L/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.7.2/../../../../powerpc-eabispe/lib

bug0.o bug1.o

GNU ld (GNU Binutils) 2.22

  Supported emulations:

   elf32ppc

   elf32ppclinux

   elf32ppcsim powerpc-eabispe-gcc @/tmp/ccMr3FEZ.args

Using built-in specs.

COLLECT_GCC=powerpc-eabispe-gcc

Target: powerpc-eabispe

Configured with: /z/src/e7/toolchain/src/gcc-4.7.2/configure

--prefix=/z/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu

--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe

--enable-languages=c,c++ --with-sysroot=/z/src/e7/toolchain/../prex_sysroot

--disable-nls --disable-werror --with-newlib

--with-gmp=/z/src/e7/toolchain/stage2 --with-mpfr=/z/src/e7/toolchain/stage2

--disable-shared --disable-debug --disable-libssp --with-cpu=8540

Thread model: single

gcc version 4.7.2 (GCC) 

COLLECT_GCC_OPTIONS='-c' '-msdata=none' '-mno-spe' '-mcpu=8540' '-v' '-Os'

'-nostdlib' '-mcpu=8540' '-dumpdir' './' '-dumpbase' 'test.wpa'

'-fltrans-output-list=/tmp/cc06h8H9.ltrans.out' '-fwpa'

'-fresolution=/tmp/ccXmIQW9.res'



/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/../../libexec/gcc/powerpc-eabispe/4.7.2/lto1

-quiet -dumpdir ./ -dumpbase test.wpa -msdata=none -mno-spe -mcpu=8540

-mcpu=8540 -auxbase bug0 -Os -version

-fltrans-output-list=/tmp/cc06h8H9.ltrans.out -fwpa

-fresolution=/tmp/ccXmIQW9.res @/tmp/ccZssqpa

GNU GIMPLE (GCC) version 4.7.2 (powerpc-eabispe)

compiled by GNU C version 4.7.2, GMP version 5.0.1, MPFR version 3.1.1, MPC

version 0.9

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

GNU GIMPLE (GCC) version 4.7.2 (powerpc-eabispe)

compiled by GNU C version 4.7.2, GMP version 5.0.1, MPFR version 3.1.1, MPC

version 0.9

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072


[Bug lto/55113] internal compiler error: in emit_library_call_value_1, at calls.c:3739

2013-03-24 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113



--- Comment #7 from Patrick Oppenlander patrick at motec dot com.au 
2013-03-25 05:41:48 UTC ---

Still present in 4.8



etpu/etpu_port.c: In function 'tpu_port_status_get.isra.26':

etpu/etpu_port.c:326:2: internal compiler error: in emit_library_call_value_1,

at calls.c:3757

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

make: *** [/tmp/ccad0BqF.ltrans2.ltrans.o] Error 1

lto-wrapper: make returned 2 exit status

/home/patrick/src/e7/toolchain/stage2/bin/../lib/gcc/powerpc-eabispe/4.8.0/../../../../powerpc-eabispe/bin/ld:

lto-wrapper failed

collect2: error: ld returned 1 exit status


[Bug lto/55112] internal compiler error: in simplify_subreg, at simplify-rtx.c:5424

2013-03-24 Thread patrick at motec dot com.au


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55112



Patrick Oppenlander patrick at motec dot com.au changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED



--- Comment #8 from Patrick Oppenlander patrick at motec dot com.au 
2013-03-25 05:51:28 UTC ---

Cannot reproduce with 4.8.0.


[Bug lto/55113] ICE in emit_library_call_value_1, at calls.c:3757

2013-06-05 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113

Patrick Oppenlander patrick at motec dot com.au changed:

   What|Removed |Added

  Attachment #28550|0   |1
is obsolete||
  Attachment #28747|0   |1
is obsolete||

--- Comment #8 from Patrick Oppenlander patrick at motec dot com.au ---
Created attachment 30264
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30264action=edit
Reduced test case

Compile with:

powerpc-eabispe-gcc -fshort-double -flto -nostdlib -o test bug.c

to reproduce the bug.


[Bug lto/55113] ICE in emit_library_call_value_1, at calls.c:3757

2013-06-05 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113

--- Comment #9 from Patrick Oppenlander patrick at motec dot com.au ---
Compiling the new test case results in:

patrick@gtr:~/Downloads/source$ powerpc-eabispe-gcc -v -fshort-double -flto
-nostdlib -o test bug.c
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.1/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-fshort-double' '-flto' '-nostdlib' '-o' 'test'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/cc1
-quiet -v bug.c -quiet -dumpbase bug.c -mcpu=8540 -auxbase bug -version
-fshort-double -flto -o /tmp/ccnCVRUu.s
GNU C (GCC) version 4.8.1 (powerpc-eabispe)
compiled by GNU C version 4.7.3, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include
#include ... search starts here:
#include ... search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.1 (powerpc-eabispe)
compiled by GNU C version 4.7.3, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e48f86d0c3d6aa531e016751882fea57
COLLECT_GCC_OPTIONS='-v' '-fshort-double' '-flto' '-nostdlib' '-o' 'test'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/../../../../powerpc-eabispe/bin/as
-me500 -many -o /tmp/ccsCqBnU.o /tmp/ccnCVRUu.s
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-v' '-fshort-double' '-flto' '-nostdlib' '-o' 'test'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/collect2
-plugin
/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/liblto_plugin.so
-plugin-opt=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccXfXmRj.res -flto
--sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --eh-frame-hdr -V -dn
-Bstatic -o test
-L/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1
-L/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.1/../../../../powerpc-eabispe/lib
/tmp/ccsCqBnU.o
GNU ld (GNU Binutils) 2.23.1
  Supported emulations:
   elf32ppc
   elf32ppclinux
   elf32ppcsim
 powerpc-eabispe-gcc @/tmp/ccKgHGUV.args
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.1/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.1 (GCC) 
COLLECT_GCC_OPTIONS='-c' '-mcpu=8540' '-v' '-nostdlib' '-mcpu=8540' '-dumpdir'
'./' '-dumpbase' 'test.wpa' '-fltrans-output-list=/tmp/ccBBf5pw.ltrans.out'
'-fwpa' '-fresolution=/tmp/ccXfXmRj.res'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.1/lto1
-quiet -dumpdir ./ -dumpbase test.wpa -mcpu=8540 -mcpu=8540 -auxbase ccsCqBnU
-version -fltrans-output-list=/tmp

[Bug lto/63215] New: LTO causes symbols for builtin functions to be omitted from object files

2014-09-09 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63215

Bug ID: 63215
   Summary: LTO causes symbols for builtin functions to be omitted
from object files
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au

-flto causes symbols for builtin functions to be omitted from object files.
Specifying -fno-builtin generates the symbols again.

This causes problems when these files are combined into an archive and used for
later linking as the linker can't resolve the symbols.

For example:

abs.c:

int abs(int j)
{
return j  0 ? -j : j;
}

Normal compile:

$ powerpc-eabispe-gcc -c abs.c -o abs.o
$ powerpc-eabispe-gcc-nm abs.o
 T abs

Compile with lto:

$ powerpc-eabispe-gcc -flto -c abs.c -o abs_lto.o 
$ powerpc-eabispe-gcc-nm abs_lto.o
/home/patrick/toolchain/lib/gcc/powerpc-eabispe/4.9.1/../../../../powerpc-eabispe/bin/nm:
abs_lto.o: no symbols

Compile with lto and no-builtin:

$ powerpc-eabispe-gcc -fno-builtin -flto -c abs.c -o abs_lto_nobuiltin.o
$ powerpc-eabispe-gcc-nm abs_lto_nobuiltin.o
 T abs

Here is the output of gcc -v

$ powerpc-eabispe-gcc -v
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.9.1/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.9.1/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.9.1 (GCC)


[Bug lto/63215] LTO causes symbols for builtin functions to be omitted from object files

2014-09-10 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63215

--- Comment #3 from Patrick Oppenlander patrick at motec dot com.au ---
Thanks for the information!

Is there a list of these functions somewhere?

Is this somehow related to bug 60395?

Thanks,

Patrick


[Bug lto/55113] ICE with LTO and -fshort-double

2014-01-20 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55113

--- Comment #12 from Patrick Oppenlander patrick at motec dot com.au ---
(In reply to Andrew Pinski from comment #10)
  -fshort-double is what is causing the issue.  Why are you using that option
 in the first place?  It changes the ABI.

We are using the option as it suits our e200z6 core very well. When it is in
use GCC 4.4.3 generates efficient code using the scalar SPFP APU (efs*
mnemonics). We don't have a hardware double-precision FPU, and no need for
double precision math.


[Bug lto/60394] New: LTO link fails when -fno-builtin is specified

2014-03-02 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60394

Bug ID: 60394
   Summary: LTO link fails when -fno-builtin is specified
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au

Attached are three test cases which demonstrate:

1. Successful link with -Os -flto -nostdlib
2. Successful link with -Os -fno-builtin -nostdlib
3. Failed link with -Os -flto -fno-builtin -nostdlib

Test case attached.

Full -v log for the failed link:

Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.2/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v test.c -quiet -dumpbase test.c -mcpu=8540 -auxbase test -Os -version
-flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include
#include ... search starts here:
#include ... search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/cc651b3O.o /tmp/ccKQLXfn.s
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v string.c -quiet -dumpbase string.c -mcpu=8540 -auxbase string -Os
-version -flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include
#include ... search starts here:
#include ... search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/ccYvBHUg.o /tmp/ccKQLXfn.s
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home

[Bug lto/60395] New: LTO link fails when -fno-builtin is specified

2014-03-02 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60395

Bug ID: 60395
   Summary: LTO link fails when -fno-builtin is specified
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au

Attached are three test cases which demonstrate:

1. Successful link with -Os -flto -nostdlib
2. Successful link with -Os -fno-builtin -nostdlib
3. Failed link with -Os -flto -fno-builtin -nostdlib

Test case attached.

Full -v log for the failed link:

Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.8.2/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-nls
--disable-werror --with-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.8.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v test.c -quiet -dumpbase test.c -mcpu=8540 -auxbase test -Os -version
-flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include
#include ... search starts here:
#include ... search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/cc651b3O.o /tmp/ccKQLXfn.s
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'
 /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/cc1
-quiet -v string.c -quiet -dumpbase string.c -mcpu=8540 -auxbase string -Os
-version -flto -fno-builtin -o /tmp/ccKQLXfn.s
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/usr/local/include
#include ... search starts here:
#include ... search starts here:
 /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/include-fixed

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.8.2 (powerpc-eabispe)
compiled by GNU C version 4.8.1, GMP version 5.0.1, MPFR version 3.1.2, MPC
version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cf996be489ceb10fd0eea05167fda0c
COLLECT_GCC_OPTIONS='-v' '-Os' '-flto' '-fno-builtin' '-nostdlib' '-o' 'test3'
'-mcpu=8540'

/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/as
-me500 -many -mbig -o /tmp/ccYvBHUg.o /tmp/ccKQLXfn.s
COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.8.2/:/home

[Bug lto/60395] LTO link fails when -fno-builtin is specified

2014-03-02 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60395

--- Comment #1 from Patrick Oppenlander patrick at motec dot com.au ---
Created attachment 32245
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32245action=edit
Test cases


[Bug middle-end/60945] internal compiler error: in dwf_regno, at dwarf2cfi.c:909

2014-04-23 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60945

--- Comment #1 from Patrick Oppenlander patrick at motec dot com.au ---
Created attachment 32665
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32665action=edit
fp-bit.c save temps output


[Bug middle-end/60945] internal compiler error: in dwf_regno, at dwarf2cfi.c:909

2014-04-23 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60945

--- Comment #2 from Patrick Oppenlander patrick at motec dot com.au ---
Created attachment 32666
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32666action=edit
fp-bit.c save temps output


[Bug middle-end/60945] internal compiler error: in dwf_regno, at dwarf2cfi.c:909

2014-04-23 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60945

--- Comment #3 from Patrick Oppenlander patrick at motec dot com.au ---
Created attachment 32667
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=32667action=edit
Complete build log


[Bug lto/48447] New: LTO link fails to link libgcc correctly when -nostdlib option is specified

2011-04-05 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48447

   Summary: LTO link fails to link libgcc correctly when -nostdlib
option is specified
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: patr...@motec.com.au


Created attachment 23879
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23879
Test cases

Not sure if this is a bug with gcc or binutils (ld) but I suspect gcc as test
case 2 succeeds.

Attached are 3 test cases which build a minimal project demonstrating the
following behaviours:

1. Link with LTO and -nostartfiles (succeeds)
2. Link without LTO and -nostdlib, libgcc is specified on the command line
(succeeds)
3. Link with LTO and -nostdlib, libgcc is specified on the command line (fails)

*** TEST 1: LTO with -nostartfiles
powerpc-eabispe-gcc -nostartfiles -flto -fuse-linker-plugin -Os -o test1 crt0.o
main.o -L.
*** TEST 2: no LTO with -nostdlib
powerpc-eabispe-gcc -nostdlib -Os -o test2 crt0.o main.o
/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.6.0/libgcc.a
*** TEST 3: LTO with -nostdlib
powerpc-eabispe-gcc -nostdlib -flto -fuse-linker-plugin -Os -o test3 crt0.o
main.o
/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.6.0/libgcc.a
/tmp/ccpXMwiG.ltrans0.ltrans.o: In function `foo.1466':
ccpXMwiG.ltrans0.o:(.text+0x84): undefined reference to `_rest32gpr_29_x'
collect2: ld returned 1 exit status
make: *** [test3] Error 1

Output of gcc -v

patrick@gtr:~/src/patrick/test$ powerpc-eabispe-gcc -v
Using built-in specs.
COLLECT_GCC=powerpc-eabispe-gcc
COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.6.0/lto-wrapper
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.6.0/configure
--prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu
--host=x86_64-unknown-linux-gnu --target=powerpc-eabispe
--enable-languages=c,c++ --with-sysroot=/home/patrick/src/e7/prex_sysroot
--disable-nls --disable-werror --with-newlib
--with-gmp=/home/patrick/src/e7/toolchain/stage2
--with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared
--disable-debug --disable-libssp --with-cpu=8540
Thread model: single
gcc version 4.6.0 (GCC)

I have tried this with binutils 2.21 and the latest 2.21.51 development
snapshot.

Please let me know if there is any other information I can provide to assist in
working this out.

Thanks,

Patrick


[Bug lto/48447] LTO link fails to link libgcc correctly when -nostdlib option is specified

2011-04-06 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48447

--- Comment #4 from Patrick Oppenlander patrick at motec dot com.au 
2011-04-06 22:47:12 UTC ---
(In reply to comment #3)
 For now, option -Wl,-plugin-opt=-pass-through=$(LIBGCC) can be manually added
 to the command line (as discussed in PR42690).

That does seem to work for now.

Does that mean this is a duplicate?


[Bug lto/48447] LTO link fails to link libgcc correctly when -nostdlib option is specified

2011-04-07 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48447

--- Comment #8 from Patrick Oppenlander patrick at motec dot com.au 
2011-04-07 22:15:56 UTC ---
 The correct fix is going to be in the linker, not the compiler, by 
 implementing
 a second library scan pass and obsoleting the pass-through mechanism.  I've 
 got
 a revised version of that experimental patch that I'll attach to this PR for
 reference.

How does this affect circular dependencies between user supplied libraries. ld
used to resolve these ok, and from the outside it seems like a similar problem.


[Bug lto/48447] LTO link fails to link libgcc correctly when -nostdlib option is specified

2011-04-07 Thread patrick at motec dot com.au
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48447

--- Comment #10 from Patrick Oppenlander patrick at motec dot com.au 
2011-04-07 22:50:25 UTC ---
Ok, thanks for explaining that.

Another problem I've run into here is that I also need to pass through ecrtn.o
with -Wl,-plugin-opt=-pass-through to make sure it gets linked last, otherwise
it's symbols end up in the wrong place.


[Bug lto/64162] New: ICE: in emit_library_call_value_1, at calls.c:3779

2014-12-02 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64162

Bug ID: 64162
   Summary: ICE: in emit_library_call_value_1, at calls.c:3779
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au

Created attachment 34176
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=34176action=edit
Reduced test case

$ powerpc-eabispe-gcc.exe -O0 -v -fshort-double -flto -fuse-linker-plugin
-nostdlib test.c
Using built-in specs.
COLLECT_GCC=Z:\home\patrick\src\e7\toolchain\local\bin\powerpc-eabispe-gcc.exe
COLLECT_LTO_WRAPPER=z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/lto-wrapper.exe
Target: powerpc-eabispe
Configured with: /home/patrick/src/e7/toolchain/src/gcc-combined/configure
--prefix=/home/patrick/src/e7/toolchain/local --build=x86_64-unknown-linux-gnu
--host=i686-w64-mingw32 --target=powerpc-eabispe --enable-languages=c,c++
--disable-nls --disable-werror --with-newlib
--with-sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --disable-shared
--disable-debug --disable-libssp --enable-sjlj-exceptions
--disable-win32-registry --disable-threads --with-dwarf2 --without-stabs
--with-gnu-ld --with-gnu-as --with-cpu=8540
Thread model: single
gcc version 4.9.2 (GCC) 
COLLECT_GCC_OPTIONS='-O0' '-v' '-fshort-double' '-flto' '-fuse-linker-plugin'
'-nostdlib' '-mcpu=8540'

z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/cc1.exe
-quiet -v -iprefix
z:\home\patrick\src\e7\toolchain\local\bin\../lib/gcc/powerpc-eabispe/4.9.2/
test.c -quiet -dumpbase test.c -mcpu=8540 -auxbase test -O0 -version
-fshort-double -flto -fuse-linker-plugin -o C:\users\patrick\Temp\ccFN20sx.s
GNU C (GCC) version 4.9.2 (powerpc-eabispe)
compiled by GNU C version 4.9.2, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory
z:/home/patrick/src/e7/toolchain/local/lib/gcc/../../lib/gcc/powerpc-eabispe/4.9.2/include
ignoring nonexistent directory
/home/patrick/src/e7/toolchain/../prex_sysroot/home/patrick/src/e7/toolchain/local/lib/gcc/powerpc-eabispe/4.9.2/../../../../include
ignoring duplicate directory
z:/home/patrick/src/e7/toolchain/local/lib/gcc/../../lib/gcc/powerpc-eabispe/4.9.2/include-fixed
ignoring duplicate directory
z:/home/patrick/src/e7/toolchain/local/lib/gcc/../../lib/gcc/powerpc-eabispe/4.9.2/../../../../powerpc-eabispe/include
#include ... search starts here:
#include ... search starts here:

z:\home\patrick\src\e7\toolchain\local\bin\../lib/gcc/powerpc-eabispe/4.9.2/include

z:\home\patrick\src\e7\toolchain\local\bin\../lib/gcc/powerpc-eabispe/4.9.2/include-fixed

z:\home\patrick\src\e7\toolchain\local\bin\../lib/gcc/powerpc-eabispe/4.9.2/../../../../powerpc-eabispe/include
 /home/patrick/src/e7/toolchain/../prex_sysroot/usr/include
End of search list.
GNU C (GCC) version 4.9.2 (powerpc-eabispe)
compiled by GNU C version 4.9.2, GMP version 4.3.2, MPFR version 2.4.2, MPC
version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4a232abe5387117e6bc5358c473b10fb
COLLECT_GCC_OPTIONS='-O0' '-v' '-fshort-double' '-flto' '-fuse-linker-plugin'
'-nostdlib' '-mcpu=8540'

z:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/powerpc-eabispe/4.9.2/../../../../powerpc-eabispe/bin/as.exe
-v -me500 -many -mbig -o C:\users\patrick\Temp\ccQYFUK0.o
C:\users\patrick\Temp\ccFN20sx.s
GNU assembler version 2.24 (powerpc-eabispe) using BFD version (GNU Binutils)
2.24
COMPILER_PATH=z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/;z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/;z:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/powerpc-eabispe/4.9.2/../../../../powerpc-eabispe/bin/
LIBRARY_PATH=z:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/powerpc-eabispe/4.9.2/;z:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/;z:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/powerpc-eabispe/4.9.2/../../../../powerpc-eabispe/lib/
COLLECT_GCC_OPTIONS='-O0' '-v' '-fshort-double' '-flto' '-fuse-linker-plugin'
'-nostdlib' '-mcpu=8540'

z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/collect2.exe
-plugin
z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/liblto_plugin-0.dll
-plugin-opt=z:/home/patrick/src/e7/toolchain/local/bin/../libexec/gcc/powerpc-eabispe/4.9.2/lto-wrapper.exe
-plugin-opt=-fresolution=C:\users\patrick\Temp\cc9lZP7A.res -flto
--sysroot=/home/patrick/src/e7/toolchain/../prex_sysroot --eh-frame-hdr -V -dn
-Bstatic
-Lz:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc/powerpc-eabispe/4.9.2
-Lz:/home/patrick/src/e7/toolchain/local/bin/../lib/gcc
-Lz:/home/patrick/src/e7/toolchain/local/bin

[Bug c/68039] New: Incorrect unused-result warning

2015-10-20 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68039

Bug ID: 68039
   Summary: Incorrect unused-result warning
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

The following code generates an incorrect unused-result warning using gcc
5.2.0:

__attribute__((warn_unused_result)) int x()
{
return 0;
}

int main()
{
return x() ? 0 : 0;
}

> gcc test.c
test.c: In function ‘main’:
test.c:8:9: warning: ignoring return value of ‘x’, declared with attribute
warn_unused_result [-Wunused-result]
  return x() ? 0 : 0;

[Bug middle-end/64162] ICE: in emit_library_call_value_1, at calls.c:3779

2016-01-26 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64162

--- Comment #4 from Patrick Oppenlander  ---
Tested with 5.3.0 under mingw and the ICE appears to be fixed.

[Bug c++/71888] New: internal compiler error: in force_type_die, at dwarf2out.c:23236

2016-07-14 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71888

Bug ID: 71888
   Summary: internal compiler error: in force_type_die, at
dwarf2out.c:23236
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

The following code snippet causes an internal compiler error in gcc 6.1.0 if
built with -g.

namespace std
{
  using ::__builtin_va_list;
}

$ g++ -g bug.cpp
bug.cpp:3:11: internal compiler error: in force_type_die, at dwarf2out.c:23236
   using ::__builtin_va_list;
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

[Bug c++/78032] New: Incorrect code generated

2016-10-18 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78032

Bug ID: 78032
   Summary: Incorrect code generated
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

The following test case generates an invalid program using GCC 6.2.1 20160830:

The call to bar is eliminated and the resultant program does nothing.

#include 

struct foo {
foo(double);
foo(float);
explicit foo(unsigned);

unsigned v;
};

void bar(foo x = 0u)
{
printf("%d\n", x.v);
}

int main()
{
bar();
return 0;
}

[Bug c++/78032] Incorrect code generated

2016-10-18 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78032

Patrick Oppenlander  changed:

   What|Removed |Added

  Known to work||5.3.0
  Known to fail||5.4.0

--- Comment #1 from Patrick Oppenlander  ---
5.3.0 correctly diagnoses the invalid program.
5.4.0 also compiles incorrectly without error or warning.

[Bug other/86011] New: Inefficient code generated for ldivmod with constant value

2018-05-30 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86011

Bug ID: 86011
   Summary: Inefficient code generated for ldivmod with constant
value
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

Tested with 7.2.0 and 8.1.0.

The following example unnecessarily calls ldivmod twice:

struct foo { long a, b; };
struct foo test(long long x)
{
return (struct foo){x / 77, x % 77};
}

armv7m-linux-musleabi-gcc -c -O2 test.c
armv7m-linux-musleabi-objdump -d test.o

 :
   0:   b5d0push{r4, r6, r7, lr}
   2:   4616mov r6, r2
   4:   461fmov r7, r3
   6:   4604mov r4, r0
   8:   224dmovsr2, #77 ; 0x4d
   a:   2300movsr3, #0
   c:   4630mov r0, r6
   e:   4639mov r1, r7
  10:   f7ff fffe   bl  0 <__aeabi_ldivmod>
  14:   4639mov r1, r7
  16:   6020str r0, [r4, #0]
  18:   224dmovsr2, #77 ; 0x4d
  1a:   4630mov r0, r6
  1c:   2300movsr3, #0
  1e:   f7ff fffe   bl  0 <__aeabi_ldivmod>
  22:   4620mov r0, r4
  24:   6062str r2, [r4, #4]
  26:   bdd0pop {r4, r6, r7, pc}

If the test is rearranged so that the denominator is a function argument the
generated code is as expected:

struct foo { long a, b; };
struct foo test(long long x, long den)
{
return (struct foo){x / den, x % den};
}

armv7m-linux-musleabi-gcc -c -O2 test.c
armv7m-linux-musleabi-objdump -d test.o

 :
   0:   b5d0push{r4, r6, r7, lr}
   2:   4616mov r6, r2
   4:   461fmov r7, r3
   6:   9a04ldr r2, [sp, #16]
   8:   4604mov r4, r0
   a:   4639mov r1, r7
   c:   4630mov r0, r6
   e:   17d3asrsr3, r2, #31
  10:   f7ff fffe   bl  0 <__aeabi_ldivmod>
  14:   e9c4 0200   strdr0, r2, [r4]
  18:   4620mov r0, r4
  1a:   bdd0pop {r4, r6, r7, pc}

[Bug target/86011] Inefficient code generated for ldivmod with constant value

2018-06-01 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86011

--- Comment #2 from Patrick Oppenlander  ---
Sure,

# cat test.c
struct foo { long a, b; };
struct foo test(long long x)
{
return (struct foo){x / 77, x % 77};
}
# gcc --version
gcc (GCC) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# gcc -c -O2 test.c
# objdump -d test.o

test.o: file format elf32-littlearm


Disassembly of section .text:

 :
   0:   e92d40d0push{r4, r6, r7, lr}
   4:   e1a06002mov r6, r2
   8:   e1a07003mov r7, r3
   c:   e1a04000mov r4, r0
  10:   e3a0204dmov r2, #77 ; 0x4d
  14:   e3a03000mov r3, #0
  18:   e1a6mov r0, r6
  1c:   e1a01007mov r1, r7
  20:   ebfebl  0 <__aeabi_ldivmod>
  24:   e1a01007mov r1, r7
  28:   e3a0204dmov r2, #77 ; 0x4d
  2c:   e3a03000mov r3, #0
  30:   e584str r0, [r4]
  34:   e1a6mov r0, r6
  38:   ebfebl  0 <__aeabi_ldivmod>
  3c:   e1a4mov r0, r4
  40:   e5842004str r2, [r4, #4]
  44:   e8bd80d0pop {r4, r6, r7, pc}

Looks like the same problem is still there.

[Bug middle-end/88456] __atomic_compare_exchange implementation inconsistently used

2018-12-12 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88456

--- Comment #3 from Patrick Oppenlander  ---
(In reply to jos...@codesourcery.com from comment #2)
> If the call is one GCC can't expand on its own (atomic operations on large 
> objects needing locks, architecture lacks required atomic operation 
> instructions, etc.), it would be reasonable for GCC to inline a definition 
> to which it would otherwise generate an out-of-line call.

What you describe is the current behaviour when using LTO. gcc happily inlines
the implementations of atomic library functions for which it can't expand
builtins.

For context, I came across this problem while implementing atomic support on
ARM Cortex-M0. Cortex-M0 doesn't support load/store-exclusive so a full suite
of functions must be provided.

I then built the same project targeting Cortex-M4 for which the Cortex-M0
implementations are not optimal, but should still work. However, the resultant
binary used gcc provided builtins in some places and my Cortex-M0
implementations in others.

I think it needs to be consistently one way or the other, or fail to build in
this situation.

Personally, I like the concept of being able to provide external
implementations, especially when considering bare-metal embedded programming.

[Bug other/88456] New: __atomic_compare_exchange implementation inconsistently used

2018-12-11 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88456

Bug ID: 88456
   Summary: __atomic_compare_exchange implementation
inconsistently used
   Product: gcc
   Version: 8.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

While implementing atomic support for an embedded target I came across some
unexpected behaviour in gcc.

In the following example:

#include 
#include 
#include 

bool
__atomic_compare_exchange_1(uint8_t *p, uint8_t *e, uint8_t d, bool w, int sm,
int fm)
{
asm volatile("nop");
return false;
}

int main()
{
uint8_t x, e, d;
atomic_compare_exchange_strong_explicit(, , d, 0, 0);

return 0;
}

The provided __atomic_compare_exchange_1 implementation is only used at -O2 or
greater:

% gcc -c -O0 test.c; objdump -d test.o |grep cmpxchg  
  60:   f0 40 0f b0 31  lock cmpxchg %sil,(%rcx)
% gcc -c -O1 test.c; objdump -d test.o |grep cmpxchg
  20:   f0 0f b0 4c 24 07   lock cmpxchg %cl,0x7(%rsp)
% gcc -c -O2 test.c; objdump -d test.o |grep cmpxchg
% gcc -c -O3 test.c; objdump -d test.o |grep cmpxchg

This was observed with gcc 8.2.1:

% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/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.1 20181127 (GCC)

[Bug target/37760] internal compiler error: in extract_insn, at recog.c:1990

2018-11-22 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37760

--- Comment #3 from Patrick Oppenlander  ---
I just tried with the gcc-7.3.0 I have installed here and can't reproduce the
(> 10 year old!) ICE.

[Bug c/89113] New: Missed stack reuse opportunity when using compound literals

2019-01-29 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89113

Bug ID: 89113
   Summary: Missed stack reuse opportunity when using compound
literals
   Product: gcc
   Version: 8.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

It appears as though gcc is missing a stack reuse opportunity when using
compound literals.

Consider the following example:

void f(int *);

void test1(void)
{
{
f((int []){1, 2, 3, 4});
}
{
f((int []){1, 2, 3, 4});
}
}

void test2(void)
{
{
int tmp[] = {1, 2, 3, 4};
f(tmp);
}
{
int tmp[] = {1, 2, 3, 4};
f(tmp);
}
}

The lifetimes of the compound literals in test1 should be equivalent to the
lifetimes of the tmp arrays in test2.

When compiling with gcc 8.2.1 only test2 reuses the stack locations for the
temporaries making test1 stack use higher:

% gcc -c test.c
% objdump -d test.o

 :
   0:   55  push   %rbp
   1:   48 89 e5mov%rsp,%rbp
   4:   48 83 ec 30 sub$0x30,%rsp
   8:   64 48 8b 04 25 28 00mov%fs:0x28,%rax
   f:   00 00
  11:   48 89 45 f8 mov%rax,-0x8(%rbp)
  15:   31 c0   xor%eax,%eax
  17:   c7 45 d0 01 00 00 00movl   $0x1,-0x30(%rbp)
  1e:   c7 45 d4 02 00 00 00movl   $0x2,-0x2c(%rbp)
  25:   c7 45 d8 03 00 00 00movl   $0x3,-0x28(%rbp)
  2c:   c7 45 dc 04 00 00 00movl   $0x4,-0x24(%rbp)
  33:   48 8d 45 d0 lea-0x30(%rbp),%rax
  37:   48 89 c7mov%rax,%rdi
  3a:   e8 00 00 00 00  callq  3f 
  3f:   c7 45 e0 01 00 00 00movl   $0x1,-0x20(%rbp)
  46:   c7 45 e4 02 00 00 00movl   $0x2,-0x1c(%rbp)
  4d:   c7 45 e8 03 00 00 00movl   $0x3,-0x18(%rbp)
  54:   c7 45 ec 04 00 00 00movl   $0x4,-0x14(%rbp)
  5b:   48 8d 45 e0 lea-0x20(%rbp),%rax
  5f:   48 89 c7mov%rax,%rdi
  62:   e8 00 00 00 00  callq  67 
  67:   90  nop
  68:   48 8b 45 f8 mov-0x8(%rbp),%rax
  6c:   64 48 33 04 25 28 00xor%fs:0x28,%rax
  73:   00 00
  75:   74 05   je 7c 
  77:   e8 00 00 00 00  callq  7c 
  7c:   c9  leaveq
  7d:   c3  retq

007e :
  7e:   55  push   %rbp
  7f:   48 89 e5mov%rsp,%rbp
  82:   48 83 ec 20 sub$0x20,%rsp
  86:   64 48 8b 04 25 28 00mov%fs:0x28,%rax
  8d:   00 00
  8f:   48 89 45 f8 mov%rax,-0x8(%rbp)
  93:   31 c0   xor%eax,%eax
  95:   c7 45 e0 01 00 00 00movl   $0x1,-0x20(%rbp)
  9c:   c7 45 e4 02 00 00 00movl   $0x2,-0x1c(%rbp)
  a3:   c7 45 e8 03 00 00 00movl   $0x3,-0x18(%rbp)
  aa:   c7 45 ec 04 00 00 00movl   $0x4,-0x14(%rbp)
  b1:   48 8d 45 e0 lea-0x20(%rbp),%rax
  b5:   48 89 c7mov%rax,%rdi
  b8:   e8 00 00 00 00  callq  bd 
  bd:   c7 45 e0 01 00 00 00movl   $0x1,-0x20(%rbp)
  c4:   c7 45 e4 02 00 00 00movl   $0x2,-0x1c(%rbp)
  cb:   c7 45 e8 03 00 00 00movl   $0x3,-0x18(%rbp)
  d2:   c7 45 ec 04 00 00 00movl   $0x4,-0x14(%rbp)
  d9:   48 8d 45 e0 lea-0x20(%rbp),%rax
  dd:   48 89 c7mov%rax,%rdi
  e0:   e8 00 00 00 00  callq  e5 
  e5:   90  nop
  e6:   48 8b 45 f8 mov-0x8(%rbp),%rax
  ea:   64 48 33 04 25 28 00xor%fs:0x28,%rax
  f1:   00 00
  f3:   74 05   je fa 
  f5:   e8 00 00 00 00  callq  fa 
  fa:   c9  leaveq
  fb:   c3  retq

[Bug c/89113] Missed stack reuse opportunity when using compound literals

2019-01-30 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89113

--- Comment #5 from Patrick Oppenlander  ---
Thanks. Sorry for the noise.

[Bug c++/92519] New: Spurious "note: ... has no user-provided default constructor"

2019-11-14 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92519

Bug ID: 92519
   Summary: Spurious "note: ... has no user-provided default
constructor"
   Product: gcc
   Version: 9.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: patrick at motec dot com.au
  Target Milestone: ---

When built with -std=c++17 the following example emits a spurious note.
Changing the lambda argument from 'auto' to 'int' no longer emits the note.

#include 

void foo()
{
[](auto v) {
std::array bar;
}(42);
}

% g++ -c -std=c++17 test.cpp
In file included from warning.cpp:1:
warning.cpp: In instantiation of ‘foo():: [with auto:1 = int]’:
warning.cpp:7:6:   required from here
/usr/include/c++/9.2.0/array:94:12: note: ‘struct std::array’ has no
user-provided default constructor
   94 | struct array
  |^
/usr/include/c++/9.2.0/array:110:56: note: and the implicitly-defined
constructor does not initialize ‘int std::array::_M_elems [3]’
  110 |   typename _AT_Type::_Type _M_elems;
  |^~~~

% g++ -v   
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.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++,d --enable-shared
--enable-threads=posix --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 gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
gcc version 9.2.0 (GCC)

[Bug target/86011] Inefficient code generated for ldivmod with constant value

2019-11-19 Thread patrick at motec dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86011

Patrick Oppenlander  changed:

   What|Removed |Added

Version|8.1.0   |9.2.0

--- Comment #3 from Patrick Oppenlander  ---
Still present in 9.2.0.