[Bug target/78946] New: optimization throws internal compiler error for uint64_t on AVR

2016-12-28 Thread tho...@maier-komor.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78946

Bug ID: 78946
   Summary: optimization throws internal compiler error for
uint64_t on AVR
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tho...@maier-komor.de
  Target Milestone: ---

Created attachment 40427
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40427=edit
set of testcase files, compile testcase.cc with -O2 to reproduce ICE

The attached code produces for optimization levels -O2 an internal compiler
error while it works without an issue for -Os. this is at least with gcc-4.9.2
and 6.3.0

thomas@glaskugel:~/avr/arduino-mini/sensor1$ /opt/local/bin/avr-g++ --version
avr-g++ (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
Dies ist freie Software; die Kopierbedingungen stehen in den Quellen. Es
gibt KEINE Garantie; auch nicht für MARKTGÄNGIGKEIT oder FÜR SPEZIELLE ZWECKE.

thomas@glaskugel:~/avr/arduino-mini/sensor1$ /opt/local/bin/avr-g++ -c
-I/usr/lib/avr/include -O2 testcase.cc
testcase.cc: In Elementfunktion »size_t Sensor_AD::fromMemory(const void*,
size_t)«:
testcase.cc:127:1: Fehler: unerkennbarer Befehl:
 }
 ^
(insn 58 57 59 6 (parallel [
(set (reg:HI 84)
(minus:HI (subreg:HI (subreg:SI (reg:DI 81) 0) 0)
(reg:HI 82)))
(clobber (scratch:QI))
]) testcase.cc:74 -1
 (nil))
testcase.cc:127:1: interner Compiler-Fehler: in extract_insn, bei recog.c:2287
0xa1abd8 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-6.3.0/gcc/rtl-error.c:108
0xa1ac09 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc-6.3.0/gcc/rtl-error.c:116
0x9f0c99 extract_insn(rtx_insn*)
../../gcc-6.3.0/gcc/recog.c:2287
0x84eb83 instantiate_virtual_regs_in_insn
../../gcc-6.3.0/gcc/function.c:1582
0x84eb83 instantiate_virtual_regs
../../gcc-6.3.0/gcc/function.c:1950
0x84eb83 execute
../../gcc-6.3.0/gcc/function.c:1999
Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
inclusive vorverarbeitetem Quellcode, wenn es dienlich ist.
Please include the complete backtrace with any bug report.
Siehe <http://gcc.gnu.org/bugs.html> für nähere Anweisungen.


thomas@glaskugel:~/avr/arduino-mini/sensor1$ avr-g++ --version
avr-g++ (GCC) 4.9.2
Copyright (C) 2014 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.

thomas@glaskugel:~/avr/arduino-mini/sensor1$ avr-g++ -c -O2 testcase.cc
testcase.cc: In member function ‘size_t Sensor_AD::fromMemory(const void*,
size_t)’:
testcase.cc:127:1: error: unrecognizable insn:
 }
 ^
(insn 58 57 59 6 (parallel [
(set (reg:HI 85)
(minus:HI (subreg:HI (subreg:SI (reg:DI 82) 0) 0)
(reg:HI 83)))
(clobber (scratch:QI))
]) testcase.cc:74 -1
 (nil))
testcase.cc:127:1: internal compiler error: in extract_insn, at recog.c:2202
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

[Bug c++/68295] internal compiler error / segmentation fault

2015-11-13 Thread tho...@maier-komor.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68295

--- Comment #4 from Thomas Maier-Komor <tho...@maier-komor.de> ---
(In reply to Richard Biener from comment #3)
> Works for me on x86_64-linux.

Yes - it seems to be cygwin specific...

[Bug c++/68295] internal compiler error / segmentation fault

2015-11-13 Thread tho...@maier-komor.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68295

--- Comment #2 from Thomas Maier-Komor <tho...@maier-komor.de> ---
Created attachment 36701
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36701=edit
Another preprocessed testcase

This testcase has no missing symbols and should compile cleanly.

[Bug c++/68295] internal compiler error / segmentation fault

2015-11-13 Thread tho...@maier-komor.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68295

--- Comment #1 from Thomas Maier-Komor <tho...@maier-komor.de> ---
The bug is reproduceable with gcc 5.2.0 on cygwin.

[Bug c++/68295] New: internal compiler error / segmentation fault

2015-11-11 Thread tho...@maier-komor.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68295

Bug ID: 68295
   Summary: internal compiler error / segmentation fault
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tho...@maier-komor.de
  Target Milestone: ---

Created attachment 36688
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36688=edit
file to reproduce the segv

g++ terminates on SegV and gives following message, when compiling the attached
file with following command line:

$ g++ -c -O2 -g gccbug.i
gccbug.cc:30:2: interner Compiler-Fehler: Segmentation fault
  cout << endl << "unknown: " << dec << unknown << '/' << total << '=' <<
(double)unknown/(double)total*100.f << '%' << endl;
  ^
Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
bearbeiten Sie die Quellen zunächst mit einem Präprozessor, wenn es
dienlich ist.
Siehe <http://gcc.gnu.org/bugs.html> für nähere Anweisungen.



The bug appears on CygWin:
$ uname -a
CYGWIN_NT-6.1 LMUC569133 2.3.0(0.291/5/3) 2015-11-09 10:24 x86_64 Cygwin

[Bug c++/51480] New: non-const default argument gets rejected

2011-12-09 Thread tho...@maier-komor.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480

 Bug #: 51480
   Summary: non-const default argument gets rejected
Classification: Unclassified
   Product: gcc
   Version: 4.5.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: tho...@maier-komor.de


non-const default arguments get rejected with following error message:
error: default argument for 'A a' has type 'A'

Here is an example, where function rejected causes an error, while function
accepted is accepted.

struct A
{
};

void accepted(const A a = A())
{
}

void rejected(A a = A())
{
}


[Bug c++/51480] non-const default argument gets rejected

2011-12-09 Thread tho...@maier-komor.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51480

--- Comment #2 from Thomas Maier-Komor tho...@maier-komor.de 2011-12-09 
09:47:06 UTC ---
Why is that so?

Visual Studio compiler seems to handle that situation without a problem and I
think it could come handy in certain situations...