Beispiel #1
0
int foo(int x) {

    printf("  in foo before blah: x = %d\n", x);
    blah(&x);
    printf("  in foo after blah: x = %d\n", x);
    return x;

}
Beispiel #2
0
static inline void float_to_int (float * _f, int16_t * s16, int num_channels) {
  int i;
  int32_t * f = (int32_t *) _f;       /* XXX assumes IEEE float format */

  for (i = 0; i < 256; i++) {
    s16[num_channels*i] = blah (f[i]);
  }
}
long long
foo (int first, long long second, int third, long long fourth, int fifth, long long sixth, int seventh,
     long long eighth, int nineth, double tenth)
{
    int blahval, secondblahval;

    blahval = blah (&second);
    secondblahval = blah (&fourth) * blah (&sixth);


    printf ("first 0x%x, second 0x%llx, third 0x%x, fourth 0x%llx, fifth 0x%x, sixth 0x%llx, seventh 0x%x"
            " eighth 0x%llx, nineth 0x%x, tenth %f\n",
            first, second, third, fourth, fifth, sixth, seventh, eighth, nineth, tenth);

    return blahval * secondblahval;

}
Beispiel #4
0
int foo (int n, int l, int m, int r)
{
  int v;

  if (n > 10)
    v = r;

  if (m) g++;
  else   bar();

  if ( (n > 10) && (l < 100))
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  if ( n > 100 )
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  return 0;
}
Beispiel #5
0
int foo (int n, int l, int m, int r)
{
  int v;

  if ( (n < 10) && (m != 100)  && (r < 20) )
    v = r;

  if (m) g++; 
  else  bar();

  if (l > 100)
    if ( (n <= 9) &&  (m < 100)  && (r < 19) )
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  if ( (n <= 8) &&  (m < 99)  && (r < 19) )
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  return 0;
}
Beispiel #6
0
int main() {
  if (x)
    if (x)
      if (x)
        if (x)
          if (x)
            if (x)
              blah();
  foo();
}
Beispiel #7
0
int foo (int n, int l, int m, int r)
{
  int v;

  if (n)
    if (l)
      v = r;

  if (m) g++;
  else   bar();

  if ( n && l)
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  if (l)
    if (n)
      blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */

  return 0;
}
int main(int argc, char** argv) 
{
    uint8_t x = lss_fresh_uint8(0);

    if (x > 5) {
    }
    else {
        blah();
    }
    return 1;
}
Beispiel #9
0
int convert_like_real (tree convs)
{
  switch (((enum tree_code) (convs)->common.code))
  {
    case AMBIG_CONV:
      return blah();
    default:
      break;
  }
  return 1;
}
Beispiel #10
0
void foo()
{
    int v;
    if (gflag)
        v = 10;

    blah(); /* *gflag may be killed, but compiler won't know */

    if (gflag)
        bar(v);   /* { dg-warning "uninitialized" "should not be promoted to error" } */
}
Beispiel #11
0
int main(void)
{
     double okay1;
     struct yuck y;
     double okay2;
     if ((((long) &okay1) & 0x7)) printf("bad alignment in main\n");
     if ((((long) &okay2) & 0x7)) printf("bad alignment in main\n");
     y = ick();
     blah(one());
     return 0;
}
Beispiel #12
0
void
baz_4 (int a, int b, int c)
{
  if (a && b)
    {
      foo ();
      if (c)
        bar ();
    }
  if (b && c)
    blah ();
}
Beispiel #13
0
static inline void float_to_int (float * _f, int16_t * s16, int nchannels)
{
    int i, j, c;
    int32_t * f = (int32_t *) _f;	// XXX assumes IEEE float format

    j = 0;
    nchannels *= 256;
    for (i = 0; i < 256; i++) {
	for (c = 0; c < nchannels; c += 256)
	    s16[j++] = blah (f[i + c]);
    }
}
void
foo (int value)
{
  switch (value)
    {
    case 42:
	      if (value != 42)
		abort ();
    case 50:
      blah ();
    }
}
Beispiel #15
0
static GFINLINE void float_to_int (float * _f, s16 *samps, int nchannels)
{
    int i, j, c;
    s32 * f = (s32 *) _f;       // XXX assumes IEEE float format

    j = 0;
    nchannels *= 256;
    for (i = 0; i < 256; i++) {
        for (c = 0; c < nchannels; c += 256)
            samps[j++] = blah (f[i + c]);
    }
}
Beispiel #16
0
void
baz_5 (int a, int b, int c)
{
  if (a && b)
    {
      foo ();
      if (c)
        bar ();
    }
  if (!b || !c)
    blah ();
}
int foo_2 (int n, int m, int r)
{
  int flag = 0;
  int v; 

  if (n)
    {
      v = r;
      flag = 1;
    }

  if (m) g++;
  else bar();

  if (flag)
    blah(v); /* { dg-bogus "uninitialized" "bogus uninitialized var warning" } */ 
  else
    blah(v); /* { dg-warning "uninitialized" "real uninitialized var warning" } */

  return 0;
}
Beispiel #18
0
atom* fixnum_helper(const std::string& s, unsigned& idx)
{
	const unsigned init = idx;
	const unsigned length = s.length();

	while ((isalnum(s[idx]) || '-' == s[idx]) && idx <= length) {
		idx += 1;
	}

	std::string blah(s.c_str() + init, s.c_str() + idx);

	return new fixnum(blah);
}
Beispiel #19
0
recBlockItem& xBlocksMap::_getItem( u32 pc )
{
	Blockmap_iterator blah( Map.find( pc ) );

	if( blah == Map.end() )
	{
		// Create a new block in the Blocks array for our item
		Map[pc] = Blocks.GetLength();
		return Blocks.New();
	}
	else
		return Blocks[blah->second];
}
Beispiel #20
0
symbol* symbol_helper(const std::string& s, unsigned& idx)
{
	const unsigned init = idx;
	const unsigned length = s.length();

	// TODO symbols can be more than alphanumerics
	while ((isalnum(s[idx]) || '!' == s[idx]) && idx <= length) {
		idx += 1;
	}

	std::string blah(s.c_str() + init, s.c_str() + idx);

	return new symbol(blah);
}
Beispiel #21
0
atom* char_helper(const std::string& s, unsigned& idx)
{
	charlit *c;

	if (' ' == s[idx + 2]) {
		c = new charlit("#\\space");
	} else if ('\n' == s[idx + 2]) {
		c = new charlit("#\\newline");
	} else {
		std::string blah(s.c_str() + idx, s.c_str() + s.length());
		c = new charlit(blah);
	}
	idx += 3;

	return c;
}
Beispiel #22
0
int foo_2 (int n, int l, int m, int r)
{
  int v;

  if (n)
    if (l)
      v = r;

  if (m) g++;
  else   bar();

  if (n || l)
      blah (v); /* { dg-warning "uninitialized" "warning" } */

  return 0;
}
Beispiel #23
0
int foo_2 (int n, int l, int m, int r)
{
  int v;

  if ( (n < 10) && (m != 100)  && (r < 20) )
    v = r;

  if (m) g++; 
  else  bar();

  if (l > 100)
    if ( (n <= 8) &&  (m < 101)  && (r < 19) )
      blah(v); /* { dg-warning "uninitialized" "real warning" } */

  return 0;
}
Beispiel #24
0
int testcase(int check_kthr_stop)
{
  int was_frozen = 0;

  for (;;) {
    if (!freezing(cur) ||
        (check_kthr_stop && blah()))
      cur->flags &= ~PF_FROZEN;

    if (!(cur->flags & PF_FROZEN))
      break;

    was_frozen = 1;
  }

  return was_frozen;
}
Beispiel #25
0
int foo (int n, int m, int r)
{
  int flag = 0;
  int v;

  if (n)
    {
      v = r;
      flag = 1;
    }

  if (m)
    g++;
  else 
    bar();

  if (r > 0)
    if (flag)
      blah(v); /* {dg-bogus "uninitialized" "bogus warning" } */
  return 0;
}
Beispiel #26
0
int foo (int n, int m, int r)
{
  int flag = 0;
  int v; 

  if (n)
    {
      v = r;
      flag = 1;
    }

  if (m)
    g++;
  else 
    bar();

  /* Wrong guard */
  if (!flag)
    blah(v); /* { dg-warning "uninitialized" "real uninitialized var warning" } */

  return 0;
}
int main(const int argc, const char *const *const argv) {
  TTree *t = 0;
  // Contents of argv should be:
  //  [0]: executable name
  //  [1]: input .root file name
  //  [2]: mode (TIMECALIB or GAINCALIB)
  if (argc>1) {
    TFile *f = TFile::Open(argv[1]);
    if (f) {std::cout << "Opened file " << argv[1] << std::endl;}
    t = (TTree*)gDirectory->Get("vmm1Calibration");
    if (argc>2) {
      calibMode = atoi(argv[2]);
      std::cout << "calibMode set to " << calibMode << " from cmd line args" << std::endl;
    }
    std::cout << "Using calibMode=" << calibMode << std::endl;
  } else {
    std::cout << "Please give .root input file as 1st argument!" << std::endl;
    return 0;
  }
  vmm1Calibration blah(t);
  blah.Loop();
  return 0;
}
Beispiel #28
0
std::string testUnit()
{
    return blah(3, "Testing").get();
}
Beispiel #29
0
int main ( void )
{
    printf("answer is %d\n", blah(3,7) );
    return 0;
}
Beispiel #30
0
Susp<std::string> blah(int i, std::string s)
{
    if (i == 0)
        return munit(s + "...");
    return blah(i - 1, s + " yada");
}