Ticket #1232 (closed bug: duplicate)

Opened 12 years ago

Last modified 12 years ago

t/src/warnings.t: Test fails when Parrot built with g++ and --optimize

Reported by: jkeenan Owned by:
Priority: normal Milestone:
Component: testing Version: 1.7.0
Severity: medium Keywords: g++ optimize
Cc: Language:
Patch status: Platform:


Inspired by mikehh's testing adventures, I decided to try to configure and build Parrot on my Linux/i386 box using, for the first time, g++ for all options and optimized, i.e.:

perl Configure.pl --test --optimize --cc=g++ --cxx=g++ --link=g++ --ld=g++ --maintainer

I got one test failure which I would not (and did not) get when I simply configured on the same machine simply with:

perl Configure.pl --test

Here is the failing test:

$ prove -v t/src/warnings.t
t/src/warnings.t .. 
ok 1 - print_pbc_location
# 'g++  -pipe -fstack-protector -I/usr/local/include 
-falign-functions=16 -fvisibility=hidden -funit-at-a-time 
-maccumulate-outgoing-args -W -Wall -Waggregate-return -Wcast-align 
-Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization 
-Wendif-labels -Wextra -Wformat -Wformat-extra-args 
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport 
-Winit-self -Winline -Winvalid-pch -Wlogical-op -Wmissing-braces 
-Wmissing-field-initializers -Wno-missing-format-attribute 
-Wmissing-include-dirs -Wpacked -Wparentheses -Wpointer-arith 
-Wreturn-type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing 
-Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef 
-Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings 
-Wlarger-than-4096 -DDISABLE_GC_DEBUG=1 -DNDEBUG -O2 
-DHAS_GETTEXT   -I./include -c -o t/src/warnings_2.o 
t/src/warnings_2.c' failed with exit code 1
# Failed to build 't/src/warnings_2.o': t/src/warnings_2.c: 
In function 'int main(int, char**)':
# t/src/warnings_2.c:14: error: invalid use of incomplete type 
'struct Parrot_Context_attributes'
# ./include/parrot/context.h:34: error: forward declaration of 
'struct Parrot_Context_attributes'
not ok 2 - Parrot_warn

#   Failed test 'Parrot_warn'
#   at t/src/warnings.t line 54.
# Looks like you failed 1 test of 2.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Test Summary Report
t/src/warnings.t (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=2,  0 wallclock secs ( 0.04 usr  0.00 sys +  0.24 cusr  0.05 csys =  0.33 CPU)
Result: FAIL

Change History

Changed 12 years ago by mikehh

I reported this failure in TT #1187 - some more detail there

it fails on all --optimize builds due to problems with include/parrot/context.h

I have had failures with Ubuntu 9.04 amd64, Ubuntu 9.10 amd64 and Ubuntu 9.10 i386 with both g++ and gcc with --optimize builds - the test passes without --optimize on all the platforms (both gcc and g++)

Changed 12 years ago by jkeenan

  • status changed from new to closed
  • cc mikehh NotFound removed
  • resolution set to duplicate

Since this issue was reported in TT #1187, I'm closing this ticket in favor of that one.


Note: See TracTickets for help on using tickets.