public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36004]  New: gcc bug on alpha
@ 2008-04-22  7:28 oliver at linux-kernel dot at
  2008-04-22  7:34 ` [Bug target/36004] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: oliver at linux-kernel dot at @ 2008-04-22  7:28 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
#include <stdlib.h>
#include <stdio.h>

struct Tst { unsigned char data[1]; };

int main(void)
{
        struct Tst *tst = malloc(sizeof(struct Tst) + 10);
        unsigned char *tmp = tst->data;

        tst->data[0] = 0;
        tmp[0] = 1;
        tmp[1] = 2;

        printf("%x %x\n", tmp[0], tmp[1]);
        printf("%x %x\n", tst->data[0], tst->data[1]);
        printf("%p %p\n", &tmp[0], &tmp[1]);
        printf("%p %p\n", &tst->data[0], &tst->data[1]);
        return 0;
}


Produces on x86_64 (Dell PC, Core 2 Duo)
1 2
1 2
0x601010 0x601011
0x601010 0x601011

Produces on alpha (DS10, EV67, Fedora 8)
1 2
1 1
0x120012010 0x120012011
0x120012010 0x120012011

Produces on ia64 (SLES 10.1)
1 2
1 2
0x6000000000004010 0x6000000000004011
0x6000000000004010 0x6000000000004011

If you need access to an alpha, I can arrange this!

Sorry, if the component is wrong.


-- 
           Summary: gcc bug on alpha
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oliver at linux-kernel dot at
 GCC build triplet: alpha-redhat-linux
  GCC host triplet: alpha-redhat-linux
GCC target triplet: alpha-redhat-linux


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36004] gcc bug on alpha
  2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
@ 2008-04-22  7:34 ` pinskia at gcc dot gnu dot org
  2008-05-02 13:56 ` [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack" falk at debian dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-22  7:34 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
          Component|c                           |target


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack"
  2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
  2008-04-22  7:34 ` [Bug target/36004] " pinskia at gcc dot gnu dot org
@ 2008-05-02 13:56 ` falk at debian dot org
  2008-05-13 10:50 ` oliver at linux-kernel dot at
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: falk at debian dot org @ 2008-05-02 13:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from falk at debian dot org  2008-05-02 13:55 -------
I can reproduce this with 4.1, but not with 4.2.3 or 4.3.1 20080401. So it
seems to be fixed.


-- 

falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack"
  2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
  2008-04-22  7:34 ` [Bug target/36004] " pinskia at gcc dot gnu dot org
  2008-05-02 13:56 ` [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack" falk at debian dot org
@ 2008-05-13 10:50 ` oliver at linux-kernel dot at
  2008-05-14 11:09 ` falk at debian dot org
  2008-05-14 19:42 ` oliver at linux-kernel dot at
  4 siblings, 0 replies; 6+ messages in thread
From: oliver at linux-kernel dot at @ 2008-05-13 10:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from oliver at linux-kernel dot at  2008-05-13 10:49 -------
Finally I have a working gcc 4.3.0, although I had to disable gnat compilation,
as there's some error. With gcc 4.3.0 ustr compiles, so this really is fixed.

Regarding gnat; Can we use this ticket for tracking the problem?


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack"
  2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
                   ` (2 preceding siblings ...)
  2008-05-13 10:50 ` oliver at linux-kernel dot at
@ 2008-05-14 11:09 ` falk at debian dot org
  2008-05-14 19:42 ` oliver at linux-kernel dot at
  4 siblings, 0 replies; 6+ messages in thread
From: falk at debian dot org @ 2008-05-14 11:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from falk at debian dot org  2008-05-14 11:08 -------
(In reply to comment #2)
> Regarding gnat; Can we use this ticket for tracking the problem?

No, please file a new bug. Or is this the same as PR 36025?


-- 

falk at debian dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |falk at debian dot org


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack"
  2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
                   ` (3 preceding siblings ...)
  2008-05-14 11:09 ` falk at debian dot org
@ 2008-05-14 19:42 ` oliver at linux-kernel dot at
  4 siblings, 0 replies; 6+ messages in thread
From: oliver at linux-kernel dot at @ 2008-05-14 19:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from oliver at linux-kernel dot at  2008-05-14 19:41 -------
(In reply to comment #3)
> (In reply to comment #2)
> > Regarding gnat; Can we use this ticket for tracking the problem?
> 
> No, please file a new bug. Or is this the same as PR 36025?

Oh yes. Sorry, forgot, that I already opened a bz for this.


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-05-14 19:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-22  7:28 [Bug c/36004] New: gcc bug on alpha oliver at linux-kernel dot at
2008-04-22  7:34 ` [Bug target/36004] " pinskia at gcc dot gnu dot org
2008-05-02 13:56 ` [Bug target/36004] alpha doesn't see stores, through other variables, for "struct hack" falk at debian dot org
2008-05-13 10:50 ` oliver at linux-kernel dot at
2008-05-14 11:09 ` falk at debian dot org
2008-05-14 19:42 ` oliver at linux-kernel dot at

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).