public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44569]  New: Debug statements passed to rtx
@ 2010-06-17 14:12 artyom dot shinkaroff at gmail dot com
  2010-08-15 19:05 ` [Bug middle-end/44569] " steven at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: artyom dot shinkaroff at gmail dot com @ 2010-06-17 14:12 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2824 bytes --]

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:
tema@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 "<built-in>"
# 1 "<command-line>"
# 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


^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <bug-44569-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-10-30 20:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-17 14:12 [Bug c/44569] New: Debug statements passed to rtx artyom dot shinkaroff at gmail dot com
2010-08-15 19:05 ` [Bug middle-end/44569] " steven at gcc dot gnu dot org
2010-08-15 19:35 ` artyom dot shinkaroff at gmail dot com
2010-08-15 19:38 ` artyom dot shinkaroff at gmail dot com
2010-08-15 20:48 ` steven at gcc dot gnu dot org
     [not found] <bug-44569-4@http.gcc.gnu.org/bugzilla/>
2010-10-29 23:11 ` rguenth at gcc dot gnu.org
2010-10-30 12:49 ` ubizjak at gmail dot com
2010-10-30 19:55 ` uros at gcc dot gnu.org
2010-10-30 20:38 ` uros at gcc dot gnu.org
2010-10-30 20:50 ` uros at gcc dot gnu.org
2010-10-30 20:55 ` uros at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).