[Bug target/54280] New: AVR target: -mmcu=atxmega128b support missing

2012-08-16 Thread hakan at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54280

 Bug #: 54280
   Summary: AVR target: -mmcu=atxmega128b support missing
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ha...@debian.org


Forwarding Debian Bug#684226 reported by a...@avarner.servebeer.com:


Using the version of avr-gcc that comes with Atmel Studio 6.0 (for Windows,
unfortunately), -mmcu=atxmega128b1 is accepted:

$ cat xmegab1test.c

#include 

int main(void)
{
while(1)
{
//TODO:: Please write your application code
}
}

$ 'C:\Program Files\Atmel\Atmel Studio
6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-gcc' -o /dev/null
-mmcu=atxmega128b1 xmegab1test.c -Wall -Wextra

$ echo $?
0

$ 'C:\Program Files\Atmel\Atmel Studio
6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin\avr-gcc' --version
avr-gcc.exe (AVR_8_bit_GNU_Toolchain_3.4.0_663) 4.6.2
Copyright (C) 2011 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.


[Bug c/53991] New: _mm_popcnt_u64 fails with -O3 -fgnu-tm

2012-07-17 Thread hakan at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991

 Bug #: 53991
   Summary: _mm_popcnt_u64 fails with -O3 -fgnu-tm
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ha...@debian.org


Created attachment 27807
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27807
preprocessed file that triggers the bug

Hi,
a call to _mm_popcnt_u64 fails to compile if -O3 and -fgnu-tm is enabled. If
either is disabled it works fine. It can be triggered by:

  #include 

  int main(void) {
  int res = _mm_popcnt_u64(0);
  printf("Result res should be 0: %d\n", res);
  }

With this command line and output:

$ gcc -v -save-temps -march=native -O3 -fgnu-tm popcnt.c 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-march=native' '-O3' '-fgnu-tm'
'-pthread'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 -E -quiet -v -imultiarch
x86_64-linux-gnu -D_REENTRANT popcnt.c -march=corei7 -mcx16 -msahf -mno-movbe
-mno-aes -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop
-mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt
-mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=32 --param
l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=corei7 -fgnu-tm -O3
-fpch-preprocess -o popcnt.i
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-march=native' '-O3' '-fgnu-tm'
'-pthread'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 -fpreprocessed popcnt.i -march=corei7
-mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mno-abm -mno-lwp
-mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2
-msse4.2 -msse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param
l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192
-mtune=corei7 -quiet -dumpbase popcnt.c -auxbase popcnt -O3 -version -fgnu-tm
-o popcnt.s
GNU C (Debian 4.7.1-2) version 4.7.1 (x86_64-linux-gnu)
compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (Debian 4.7.1-2) version 4.7.1 (x86_64-linux-gnu)
compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9e08a85d4bf68460be9df04a431a25b0
popcnt.c: In function ‘main’:
popcnt.c:5:5: warning: incompatible implicit declaration of built-in function
‘printf’ [enabled by default]
In file included from
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/smmintrin.h:796:0,
 from popcnt.c:1:
/usr/lib/gcc/x86_64-linux-gnu/4.7/include/popcntintrin.h:40:1: error: inlining
failed in call to always_inline ‘_mm_popcnt_u64’: 
popcnt.c:4:29: error: called from here


[Bug c/53992] New: Combining -fopenmp and -fgnu-tm results in segfault or misbehaving binaries

2012-07-17 Thread hakan at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53992

 Bug #: 53992
   Summary: Combining -fopenmp and -fgnu-tm results in segfault or
misbehaving binaries
Classification: Unclassified
   Product: gcc
   Version: 4.7.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ha...@debian.org


Created attachment 27808
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27808
Preprocessed source

Hi,
is the combination of -fopenmp and -fgnu-tm supported? Otherwise maybe some
error message explaining that it's not would be appropriate? Attached is a case
that makes gcc segfault:


$ gcc -v -fopenmp -fgnu-tm  min.c && ./a.out 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2) 
COLLECT_GCC_OPTIONS='-v' '-fopenmp' '-fgnu-tm' '-mtune=generic' '-march=x86-64'
'-pthread' '-pthread'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 -quiet -v -imultiarch x86_64-linux-gnu
-D_REENTRANT min.c -quiet -dumpbase min.c -mtune=generic -march=x86-64 -auxbase
min -version -fopenmp -fgnu-tm -o /tmp/ccsCNMGH.s
GNU C (Debian 4.7.1-2) version 4.7.1 (x86_64-linux-gnu)
compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
warning: GMP header version 5.0.5 differs from library version 5.0.4.
warning: MPFR header version 3.1.0-p10 differs from library version 3.1.0-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C (Debian 4.7.1-2) version 4.7.1 (x86_64-linux-gnu)
compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10,
MPC version 0.9
warning: GMP header version 5.0.5 differs from library version 5.0.4.
warning: MPFR header version 3.1.0-p10 differs from library version 3.1.0-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9e08a85d4bf68460be9df04a431a25b0
min.c: In function ‘main’:
min.c:16:5: warning: incompatible implicit declaration of built-in function
‘printf’ [enabled by default]
min.c: In function ‘main._omp_fn.0’:
min.c:8:13: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Preprocessed source stored into /tmp/cczZfnZg.out file, please attach this to
your bugreport.


If -O3 is enabled a binary is produced, but it misbehaves:

$ gcc -v -fopenmp -fgnu-tm  -O3 min.c 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.1 (Debian 4.7.1-2) 
COLLECT_GCC_OPTIONS='-v' '-fopenmp' '-fgnu-tm' '-O3' '-mtune=generic'
'-march=x86-64' '-pthread' '-pthread'
 /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1 -quiet -v -imultiarch x86_64-linux-gnu
-D_REENTRANT min.c -quiet -dumpbase min.c -mtune=generic -march=x86-64 -auxbase
min -O3 -version -fopenmp -fgnu-tm -o /tmp/ccwYfizG.s
GNU C (Debian 4.7.1-2) ve