[Bug middle-end/44569] Debug statements passed to rtx

2010-08-15 Thread artyom dot shinkaroff at gmail dot com


--- Comment #2 from artyom dot shinkaroff at gmail dot com  2010-08-15 
19:35 ---
Created an attachment (id=21483)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21483&action=view)
Recent version of the patch for the revision 163240

Recent version of the patch for the revision 163240


-- 


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



[Bug middle-end/44569] Debug statements passed to rtx

2010-08-15 Thread artyom dot shinkaroff at gmail dot com


--- Comment #3 from artyom dot shinkaroff at gmail dot com  2010-08-15 
19:38 ---
Yes, I still would like to solve the problem.

I just uploaded the patch for the revision 163240 (2010-08-14). The bug is
still there. The problem happens when you compile the following code with "-On
-g".

#define vector(elcount, type)  \
__attribute__((vector_size((elcount)*sizeof(type type

#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
#define uchar unsigned char

#define ch14 1,2,3,4
#define ch1  1,1,1,1

int main (int argc, char *argv[]) {
vector(16, uchar) vuchar  = { ch14, ch14, ch14, ch14};
vector(16,  char) vchar0  = { ch1, ch1, ch1, ch1};
vector(16, uchar) u1;

u1 = vuchar << vchar0;

if (vidx(char, u1, 0) != ((uchar)1  << (char)1))
__builtin_abort ();

vuchar <<= vchar0;
return 0;
}

The error message is the same as in the original description.
Thanks for help.


-- 


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



[Bug c/44569] New: Debug statements passed to rtx

2010-06-17 Thread artyom dot shinkaroff at gmail dot com
I am working on a vector shifting patch,
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01511.html and I noticed the
following effect. When I compile the code with "-O -g", then the compiler
crashes with an error: 
"internal compiler error: in simplify_subreg, at simplify-rtx.c:5128".

If I use -On or -g separately, the compilation works fine. It also works fine
with -On -g -fno-var-tracking-assignments.

The unpreprocessed code:
/* dg-do run */
#define vector(elcount, type)  \
__attribute__((vector_size((elcount)*sizeof(type type

#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
#define uchar unsigned char

#define ch14 1,2,3,4
#define ch1  1,1,1,1

int main (int argc, char *argv[]) {
vector(16, uchar) vuchar  = { ch14, ch14, ch14, ch14};
vector(16,  char) vchar0  = { ch1, ch1, ch1, ch1};
vector(16, uchar) u1;

u1 = vuchar << vchar0;

if (vidx(char, u1, 0) != ((uchar)1  << (char)1))
__builtin_abort ();

vuchar <<= vchar0;
return 0;
}

Compilation process:
t...@tema-notebook:~/phd/gcc/host-x86_64-unknown-linux-gnu/gcc$ ./xgcc -Wall
-B. -O -g  vector-shift3.c -fdump-tree-all -save-temps
vector-shift3.c: In function ‘main’:
vector-shift3.c:23:1: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5128
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The *.i file:
# 1 "vector-shift3.c"
# 1 "/home/tema/phd/gcc/host-x86_64-unknown-linux-gnu/gcc//"
# 1 ""
# 1 ""
# 1 "vector-shift3.c"
# 11 "vector-shift3.c"
int main (int argc, char *argv[]) {
__attribute__((vector_size((16)*sizeof(unsigned char unsigned char
vuchar = { 1,2,3,4, 1,2,3,4, 1,2,3,4, 1,2,3,4};
__attribute__((vector_size((16)*sizeof(char char vchar0 = { 1,1,1,1,
1,1,1,1, 1,1,1,1, 1,1,1,1};
__attribute__((vector_size((16)*sizeof(unsigned char unsigned char u1;

u1 = vuchar << vchar0;

if ((*((char *) &(u1) + 0)) != ((unsigned char)1 << (char)1))
__builtin_abort ();

vuchar <<= vchar0;
return 0;
}

The new patch should not affect this place. The problem is that I cannot repeat
this behaviour without the interface changes in my patch.
I'm ready to look into it, but I don't have knowledge in this part of the
compiler.


-- 
   Summary: Debug statements passed to rtx
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
      Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: artyom dot shinkaroff at gmail dot com
 GCC build triplet: xgcc (GCC) 4.6.0 20100610 (experimental)
  GCC host triplet: host-x86_64-unknown
GCC target triplet: linux-gnu


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