[Bug middle-end/50607] [4.7 Regression] FAIL: gcc.dg/bconstp-3.c

2011-10-03 Thread artyom.shinkaroff at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50607

--- Comment #2 from Artem Shinkarov  
2011-10-03 23:17:22 UTC ---
That seems to be the changes caused by the patch I have committed. However, may
be this is a test-case that needs adjustment. 

I'll have to consult with Joseph. He asked to change the behavior of both
functions.


[Bug middle-end/50607] [4.7 Regression] FAIL: gcc.dg/bconstp-3.c

2011-10-03 Thread artyom.shinkaroff at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50607

--- Comment #3 from Artem Shinkarov  
2011-10-03 23:32:47 UTC ---
(In reply to comment #1)
> For cris-elf too (unsurprisingly as the error seems universal), plus I'm 
> seeing
> a:
> 
> FAIL: gcc.c-torture/execute/pr23135.c compilation,  -O2 -flto  (internal
> compiler error)

This is very unlikely that my patch caused this. The testcase as I can see uses
8-byte vectors and standard arithmetic operations. My patch introduces vector
shuffling on 16-byte vectors. The way the operations from pr23135.c are
performed didn't change.

On x86 linux the testcase does not cause segfaults, so may be you could
investigate via gdb which function cause segfault on cris-elf.


Thanks,
Artem.


[Bug middle-end/50607] [4.7 Regression] FAIL: gcc.dg/bconstp-3.c

2011-10-04 Thread artyom.shinkaroff at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50607

--- Comment #6 from Artem Shinkarov  
2011-10-04 15:12:54 UTC ---
Created attachment 25410
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25410
Fixes the failure caused by non-preserving original_code of c_expr.

Bootstrapped and regteted on all the tests that include modified __builtin_XXX
functions:

-- All the tests that use __builtin_choose_expr
gcc/testsuite/gcc.dg/gnu89-const-expr-2.c
gcc/testsuite/gcc.dg/Wunused-var-2.c
gcc/testsuite/gcc.dg/builtin-choose-expr.c
gcc/testsuite/gcc.dg/builtin-choose-expr-2.c
gcc/testsuite/gcc.dg/bconstp-3.c
gcc/testsuite/gcc.dg/bconstp-4.c
gcc/testsuite/gcc.dg/gnu99-const-expr-2.c

-- All the tests that use __builtin_complex
gcc/testsuite/gcc.dg/builtin-complex-err-2.c
gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
gcc/testsuite/gcc.dg/dfp/builtin-complex.c
gcc/testsuite/gcc.dg/builtin-complex-err-1.c

-- All the tests that use __builtin_shuffle
gcc/testsuite/gcc.c-torture/execute/vect-shuffle-3.c
gcc/testsuite/gcc.c-torture/execute/vect-shuffle-2.c
gcc/testsuite/gcc.c-torture/execute/vect-shuffle-1.c
gcc/testsuite/gcc.c-torture/execute/vect-shuffle-4.c
gcc/testsuite/gcc.c-torture/execute/vect-shuffle-5.c


[Bug middle-end/50607] [4.7 Regression] FAIL: gcc.dg/bconstp-3.c

2011-10-05 Thread artyom.shinkaroff at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50607

--- Comment #7 from Artem Shinkarov  
2011-10-06 02:07:38 UTC ---
bconstp-3.c failure is fixed with the commit 179588.

2011-10-06  Artjoms Sinkarovs  
* c-tree.h (c_expr_t): New typedef for struct c_expr.
(C_EXPR_APPEND): New macro.
* c-parser.c (c_parser_get_builtin_args): Preserve 
original_tree_code of c_expr structure. Fixes bconstp-3.c
failure of PR50607.
(c_parser_postfix_expression): Adjust to the new function.


The problem of vect-shuffle tests should be resolved by commit 179564.


Thanks,
Artem.


[Bug middle-end/50716] Segmentation fault caused by misaligned vector access

2011-10-13 Thread artyom.shinkaroff at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50716

Artem Shinkarov  changed:

   What|Removed |Added

 CC||artyom.shinkaroff at gmail
   ||dot com

--- Comment #2 from Artem Shinkarov  
2011-10-13 19:51:36 UTC ---
(In reply to comment #1)
> I think vec has an alignment requirement which makes the testcase invalid.

Ok, but in that case the compiler should say something to the user.  Rejecting
such a code could be a first step.

However, in general I think that the compiler should analyse the code and
figure our which instruction suits in the given situation.  If alignment can be
evaluated -- aligned move, unaligned move otherwise.