fefrei / prog2tests

Automatically exported from code.google.com/p/prog2tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

strange scope issues

GoogleCodeExporter opened this issue · comments

Test that...

int f(int a) { 
  if (a == 0) 
    int b = 5; 
  else 
    int c = 5; 
  c = c + 5; 
  return c; 
}

1. compiles without problems
2. has the expected behavior for a != 0
3. gives some result for a=0

Original issue reported on code.google.com by felix@familie-freiberger.net on 3 Aug 2012 at 8:39

also test
do { int b = 5; } while (b > 0)

Original comment by felix@familie-freiberger.net on 3 Aug 2012 at 8:41

  • Changed title: strange scope issues
will be included in CompilerFelixTest

Original comment by felix@familie-freiberger.net on 6 Aug 2012 at 2:47

  • Changed state: Started
This issue was closed by revision r125.

Original comment by felix@familie-freiberger.net on 6 Aug 2012 at 7:15

  • Changed state: Fixed