[Bug other/62248] New: Configure error with --with-fpu=fp-armv8

2014-08-24 Thread amanieu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62248

Bug ID: 62248
   Summary: Configure error with --with-fpu=fp-armv8
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: trivial
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amanieu at gmail dot com

There seems to be a typo in gcc/config.gcc:3531:
| fpv4-sp-d16 | neon-vfpv4 | fp-arm-v8 | neon-fp-armv8 \

"fp-arm-v8" should be "fp-armv8", matching the -mfpu option name.


[Bug c/62024] __atomic_always_lock_free is not a constant expression

2014-08-12 Thread amanieu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62024

--- Comment #2 from Amanieu d'Antras  ---
A similar error happens when trying to use the result of
__atomic_always_lock_free as the size of an array:

int array[__atomic_always_lock_free(sizeof(int), 0)];

test.c:1:5: error: variably modified ‘array’ at file scope

[Bug c/62024] New: __atomic_always_lock_free is not a constant expression

2014-08-05 Thread amanieu at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62024

Bug ID: 62024
   Summary: __atomic_always_lock_free is not a constant expression
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amanieu at gmail dot com

This line causes an error despite the documentation saying that
__atomic_always_lock_free is a constant expression:

_Static_assert(__atomic_always_lock_free(sizeof(int), 0), "");

test.c:1:16: error: expression in static assertion is not constant


[Bug target/39442] New: In some cases __builtin_ia32_loadups generates a movaps instruction

2009-03-12 Thread amanieu at gmail dot com
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

This code causes an alignment fault because __builtin_ia32_loadups will
generate a movaps instruction instead of a movups instruction.

#include 
void sse_func(__m128, __m128);
float *get_arg(int);

int main(void)
{
sse_func(__builtin_ia32_loadups(get_arg(0)),
__builtin_ia32_loadups(get_arg(0)));
}

Disassembly:
pushl   $0
callget_arg
movaps  (%eax), %xmm0
movups  %xmm0, 16(%esp)
movl$0, (%esp)
callget_arg
movaps  16(%esp), %xmm1
movups  (%eax), %xmm0
callsse_func
addl$40, %esp

get_arg() returns a non-aligned pointer, but it is loaded with movaps which
expects a 16-byte aligned pointer. movups should be used instead. Also, the
next instruction stores the SSE register to the stack which is already
guaranteed to be 16-byte aligned, but it uses movups, which should only be used
for non 16-byte aligned pointers.

Command-line:
gcc -O1 -march=i386 -msse -fomit-frame-pointer -S test.c -o -

Bug also occurs with -O2 and -O3, but not with -O0, and with -march=i486 and
-march=i586, but not with -march=i686. The bug disappears when
-fomit-frame-pointer is removed.

The bug also disappears when get_arg(int) is changed to get_arg(void):'

#include 
void sse_func(__m128, __m128);
float *get_arg(void);

int main(void)
{
sse_func(__builtin_ia32_loadups(get_arg()),
__builtin_ia32_loadups(get_arg()));
}


-- 
   Summary: In some cases __builtin_ia32_loadups generates a movaps
instruction
   Product: gcc
   Version: 4.3.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amanieu at gmail dot com
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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