Issue Details (XML | Word | Printable)

Key: PCC-472
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Volkmar Klatt
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

struct consisting of 1 long long int and 6 (or more) int crashes program

Created: 15/Aug/14 05:13 PM   Updated: 16/Aug/14 05:10 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. Text File tr_20140815_77.c (0.6 kB)
2. Text File tr_20140815_77_linux32bit.s (0.8 kB)

Environment:
pcc 1.1.0.DEVEL 20140815 for i686-pc-linux-gnu
and
pcc 1.1.0 DEVEL 20140807 for i386-unknown-openbsd 5.2


 Description  « Hide
/* tr_20140815_77.c - test file for pcc - Volkmar Klatt
   struct consisting of 1 long long int and 6 int crashes program.
   pcc 1.1.0.DEVEL 20140815 for i686-pc-linux-gnu
   (also true with pcc 1.1.0 DEVEL 20140807 for i386-unknown-openbsd 5.2)

   usage:
   pcc tr_20140815_77.c -o zz
   ./zz # program crashes */
struct S {
   long long int f0; /* does not have to be on first position */
   int f1,f2,f3,f4,f5,f6; /* 6 or more ints, but no less */
};

struct S a = {1, 1, 1, 1, 1, 1, 1};
struct S *pa = &a;
struct S *pb = &a;

int main (void)
{
   (*pb) = ((*pa) = a); /* crash */

   return 0;
}




 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 16/Aug/14 05:10 PM
Hm, you manage to find the most odd corner cases :-)
Anyway, fixed now. It was a register need constraint that wasn't taken care of.