Issue Details (XML | Word | Printable)

Key: PCC-117
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Jörg Schilling
Votes: 0
Watchers: 0
Operations

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

ccom dumps core with labels before related goto

Created: 23/Feb/10 06:02 PM   Updated: 25/Nov/10 06:58 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Solaris SXCE SNV_105


 Description  « Hide
A code phrase like:

func()
{
again:

...
...
goto again;
}

causes ccom do dump core

program terminated by signal FPE (integer divide by zero)
0xfee729b2: UDivRem+0x0092: divl 0x00000040(%esp),%eax
(dbx) where
=>[1] UDivRem(0x81020b8, 0x0), at 0xfee729b2
  [2] optim(0x811036c, 0x0), at 0x805a86b
  [3] optim(0x8110868, 0x0), at 0x805a852
  [4] ecomp(0x8110868, 0x0), at 0x806d688
  [5] yyparse(0x80c674c, 0x80c65d0, 0xffffffff, 0x8047674, 0x8047584, 0x805a65d), at 0x80703fc
  [6] main(0x2, 0x8047598, 0x80475a4, 0x804754c), at 0x8095db0
(dbx)



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 25/Feb/10 06:46 PM
Which flags do you use? Can you provide pcc -v output of the compilation?

Jörg Schilling added a comment - 26/Feb/10 12:48 AM
        ==> COMPILING "fmt.o"
pcc 0.9.9 for i386-pc-solaris2.11, joerg@opt Tue Feb 23 11:47:40 CET 2010
/opt/pcc/libexec/cpp -v -D__PCC__=0 -D__PCC_MINOR__=9 -D__PCC_MINORMINOR__=9 -D__GNUC__=4 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 -D__GNUC_STDC_INLINE__=1 -Dunix -Dsun -D__SVR4 -D__unix -D__sun -D__SunOS -D__ELF__ -D__STDC_ISO_10646__=200009L -D__WCHAR_TYPE__=unsigned int -D__SIZEOF_WCHAR_T__=4 -D__WCHAR_MAX__=4294967295U -D__WINT_TYPE__=unsigned int -D__SIZE_TYPE__=unsigned long -D__PTRDIFF_TYPE__=int -D__SIZEOF_WINT_T__=4 -D__i386__ -D__i386 -DSCHILY_BUILD -IOBJ/i386-sunos5-pcc -I../incs/i386-sunos5-pcc -I../include -D__SVR4 -D__SVR4 -DSVR4 -I../libscg -I. -DFMT -DSCHILY_PRINT -S /opt/pcc/include/pcc/ -S /usr/include/ -S /opt/pcc/lib/pcc/i386-pc-solaris2.11/0.9.9/include/ fmt.c /tmp/ctm._yaG9S
cpp: pcc 0.9.9 for i386-pc-solaris2.11, joerg@opt Tue Feb 23 11:47:40 CET 2010
/opt/pcc/libexec/ccom -v -xtemps -xdeljumps -xinline /tmp/ctm._yaG9S /tmp/ctm..yaG9S
ccom: pcc 0.9.9 for i386-pc-solaris2.11, joerg@opt Tue Feb 23 11:47:40 CET 2010
smake: Not owner. *** Code 1 from command line for target 'fmt.o'.
smake: The following command caused the error:
echo " ==> COMPILING \"fmt.o\""; pcc -O -v -DSCHILY_BUILD -IOBJ/i386-sunos5-pcc -I../incs/i386-sunos5-pcc -I../include -D__SVR4 -D__SVR4 -DSVR4 -I../libscg -I. -DFMT -DSCHILY_PRINT -c -o OBJ/i386-sunos5-pcc/fmt.o fmt.c
smake: Couldn't make 'all'.

Anders Magnusson added a comment - 27/Jun/10 06:36 PM
I just tested with this small program on snv_85:

func()
{
again:

z();
goto again;
}

but no coredumps...? Is the bug still around?

Anders Magnusson added a comment - 25/Nov/10 06:58 PM
Closed due to no response from the requestor.